Click here to Skip to main content
15,894,825 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Save images to database or folder?
Posted
Updated 1-Oct-14 10:09am
v2
Comments
[no name] 1-Oct-14 13:30pm    
Yes
PIEBALDconsult 1-Oct-14 13:34pm    
It depends.

Check this thread.It explains PROS and CONS of storing images in db and folders

Storing images in DB vs in Folder Structure

read this thread too :-)
 
Share this answer
 
Well that depends on how and what your hosting plan would allow. If you're having both to be unlimited on size, then there is no trouble. However in most cases the File system (hard disk space for files) is provided as unlimited but database space is bound to be >500MB and <2GB. So it is of no use to store that much files in the database.

However, I would really suggest that you save the images and other files in the file system, not in the database. In the file system, you get more options to work with files. However, you can still convert the binary files you are having in the database but that is a long method of conversion to an object of File and so on.

So, in every aspect, saving the file in the file system is a better option (In my opinion).
 
Share this answer
 
Adding to the above answers, refer my answer - Where do you store image in asp.net[^].
 
Share this answer
 
I would suggest you save the file in the file system but the actual path in DB with related fields. So that you can retrieve all the info faster and only when user chooses to, download the file.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900