I'm storing files(images) outside document root. I have special action for serving these files. It checks user permissions for file and sends X-Sendfile header with filename and Apache serves the actual file to user.
It does not block your ruby processes. If you are using Passenger, than uploading large files are handled by Passenger and your script is only called for processing, so it's not bocked either. For Apache there is a module: http://tn123.ath.cx/mod_xsendfile/ ; Nginx has this funtionality implemented. M. On Wed, Jul 8, 2009 at 8:46 PM, Arzumy<[email protected]> wrote: > > May I add that by storing your images in on filesystem within public > will allow any request to bypass your app server and serve directly by > web server. And less database hit, means faster response time :) > > Strongly suggest don't store in database, if later on you want to > manipulate the images using external application, you can do it easily > if everything on filesystem. And using paperclip for example, allows > you to store multiple copies of the images in different sizes, created > immediately after upload. > > But yeah, if you could provide more info on what you want to achieve, > the implementation could differ :) > > Cheers! > Arzumy > > On Jul 8, 10:47 pm, Roderick van Domburg <rails-mailing-l...@andreas- > s.net> wrote: >> Exactly what does "large image content" mean? Are they large images, or >> will you have a large amount of images? Is the typical workload >> characterized by read operations or write operations? Do some of the >> images require access authorization? >> >> Reading from the filesystem is faster than from the database. What's >> best for you depends on your specific situation. >> >> -- >> Roderick van Domburghttp://www.nedforce.com >> -- >> Posted viahttp://www.ruby-forum.com/. > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

