On Aug 13, 3:06 pm, Siddharth Ravichandran <rails-mailing-l...@andreas- s.net> wrote: > hitch wrote: > > You probably do not want to store the files in public. Store them > > somewhere else if you need to protect them with passwords. > > You can easily upload them to Amazon's S3 with attachment_fu, just be > > sure to set :s3_access to an appropriate value > > And you can use send_data with :disposition => 'inline' to send the > > data to the user. See > >http://api.rubyonrails.org/classes/ActionController/Streaming.html > > > On Aug 12, 10:57 am, Siddharth Ravichandran <rails-mailing- > > Thank you for the response. I read on a few forums that storing it on > the public file is better because it reduces databases access time which > may eventually slow done the entire application. As I would be working > with a lot of mp3 files is there anyway I can store them in folder that > can be protected because Mysql does not handle the blob format very well > and I am unable to get it retrieve it with the same quality. > > Can mp3s be stored in mysql in any other way like binary format and > retrieved without loss of quality. > > Thank you again. > -- > Posted viahttp://www.ruby-forum.com/.
Slow down and think. You can store files in the local filesystem in places other than your Rails apps /public directory. hitch linked you to http://api.rubyonrails.org/classes/ActionController/Streaming.html; send_file is a good place to start. (Though in practice this just tends to be good at tieing up a specific Rails instance during the file sending process and you'll eventually use something like mod_xsendfile, but take one thing at a time!) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

