开发者

What is the best way to model upload functionality for files that are "bulk" in nature?

I want users to be able to upload data files that will be processed in the background on my application.

I see many examples of using paperclip to allow files to be attached to specific models. But these files don't have a one-to-one correspondence to any of my models. How should I model this in Rails 3?

The way I would approach it, barring any input from people smarter than me, is 开发者_开发知识库to define "file types" for a specific model that is associated with the user account model itself. Then the upload process would place those files in a specific directory where they would be picked up by a poller that would then process the files.


Polymorphic Paperclip?

http://burm.net/2008/10/17/ruby-on-rails-polymorphic-paperclip-plugin-tutorial/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜