Chamnap
2007-Jun-14 04:45 UTC
Uploading pictures to database or put them in the file system?
Hello, guys I want your ideas whether uploading pictures to database or uploading to the file system on the web server is the best way to implement? Can you give me pros and cons about this issue? Thanks Chamnap --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
MichaelLatta
2007-Jun-14 05:16 UTC
Re: Uploading pictures to database or put them in the file system?
File systems are much better designed for holding files than databases. While databases must keep all that data in the transaction log and be able to roll back the changes, etc., file systems generally do not attempt to provide that level of data integrity. As such they are faster and more efficient at it. Since databases require full pages for blobs you do not save any space placing files in the database either. But, if efficiency is not the issue, putting them in the database means you do not need to worry about orphaned files and so on. Michael On Jun 13, 9:45 pm, Chamnap <chamnapchh...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hello, guys > > I want your ideas whether uploading pictures to database or uploading > to the file system on the web server is the best way to implement? Can > you give me pros and cons about this issue? > > Thanks > Chamnap--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Benjamin Curtis
2007-Jun-14 12:47 UTC
Re: Uploading pictures to database or put them in the file system?
I wrote on this a while back: http://www.bencurtis.com/archives/2006/11/how-to-handle-uploaded- files-with-rails/ -- Benjamin Curtis http://www.bencurtis.com/ -- blog http://agilewebdevelopment.com/rails-ecommerce -- build e-commerce sites with Rails On Jun 13, 2007, at 9:45 PM, Chamnap wrote:> > Hello, guys > > I want your ideas whether uploading pictures to database or uploading > to the file system on the web server is the best way to implement? Can > you give me pros and cons about this issue? > > Thanks > Chamnap >--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Andrew Kuklewicz
2007-Jun-14 18:49 UTC
Re: Uploading pictures to database or put them in the file system?
if you are uploading lots of images, I say neither - use amazon s3 :) -Andrew Kuklewicz http://beginsinwonder.com On 6/14/07, Benjamin Curtis <rails-4dtGyw5agdmakBO8gow8eQ@public.gmane.org> wrote:> > > I wrote on this a while back: > > http://www.bencurtis.com/archives/2006/11/how-to-handle-uploaded- > files-with-rails/ > > -- > Benjamin Curtis > http://www.bencurtis.com/ -- blog > http://agilewebdevelopment.com/rails-ecommerce -- build e-commerce > sites with Rails > > > On Jun 13, 2007, at 9:45 PM, Chamnap wrote: > > > > > Hello, guys > > > > I want your ideas whether uploading pictures to database or uploading > > to the file system on the web server is the best way to implement? Can > > you give me pros and cons about this issue? > > > > Thanks > > Chamnap > > > > > > >-- Andrew Kuklewicz --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---