Discussion Locked

store images/files in a db or in a folder

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I'm building an asp.net website using VB. I'd like to know what is better: to store files/images in a db (i'm using sqlserver) in binary mode or store them in a folder on server. What are the advantages and disadvantages of each method? And if there is a difference between the files and the images please specify it...
Thank you

3 replies

by ed woychowsky

Being of the paranoid persuasion, I?m not real fond of the idea of having folders with write permission on the web server. Storing images in a database also strikes me as cleaner, but I may be bias.

by rmcvay

I prefer putting binary data like images into a file system and URLs to those files in database tables. The access to the file system can be restricted to ONLY the web server account so it can actually be safer than techniques that give user account access to that data. (Web servers should be run with accounts that have very low permissions under the host OS.)

by ge.goodman

The coding overhead of storing and retreiving images using a database is too much to bother with. Upload images to a folder and store a url in the database instead. Sensible limits on file sizes will help with the paranoia bit ;-)

This discussion is closed to new replies.