What's the best place to store an image?
In the database? or in the Filesystem?
What if I have multiple s开发者_如何转开发ervers? Would filesystem storage still work?
Thank you
This question has been answered many times before, e.g. here.
I'll add from myself that, since that time (2 years ago) I've come to trust external storage services, like Amazon S3. They are fairly cheap, provide most benefits of filesystem storage and also scale well.
Definitely you should store images in the filesystem or your database become huge.
Also you can use NFS (http://nfs.sourceforge.net/) to make images storage on one server and use "share" directory.
Or you can use rsync for syncing you images content on different servers.
精彩评论