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/
精彩评论