Solved

asp.net: question what is the best way to save pictures in a storage file or Database?

Posted on 2010-08-22
6
372 Views
Last Modified: 2013-11-08
what would be the best way to handle images saving to a file on the server or to the database...the website is one that allows a user to add pictures to an ad that the user plans to sell something and the user can add upto 6 pictures per listing. we have no control weather the user can modify the picture size. the user can post the ad and delete the ad.
0
Comment
Question by:westdh
6 Comments
 
LVL 7

Accepted Solution

by:
Norush earned 125 total points
Comment Utility
This has been discussed on the offical Microsoft asp.net forums:

Here is the link to the discussion: http://forums.asp.net/t/874333.aspx

This one also answers this question quite well: http://databases.aspfaq.com/database/should-i-store-images-in-the-database-or-the-filesystem.html


0
 
LVL 10

Assisted Solution

by:Espavo
Espavo earned 250 total points
Comment Utility
Personally... I'd save these images to the database... (I've used both methods and have found the database version much better than saving to the filesystem...)
Espavo
0
 

Author Comment

by:westdh
Comment Utility
I believe the database is better also... but why I am not sure.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 10

Assisted Solution

by:Espavo
Espavo earned 250 total points
Comment Utility
Some of the reasons why I use the database method are:
  • Easy to manage images, and their location...
  • No need to keep track of 1,000s of physical files in folders...
  • HDD doesn't become fragmented because of LOTS of files (better HDD performance)...
  • If a user "closes his account", you simply delete the related images from the DB... (no need to identify and delete files)
  • No worrying about image naming convention...
0
 
LVL 16

Assisted Solution

by:Vikram Singh Saini
Vikram Singh Saini earned 125 total points
Comment Utility
Hi,

It depends on what is your priority of saving images such as do you want to get more management done for you itself (database best) or if you want fast response of saving images (file system best). But when you are trying to update or upgrade your website which one will be good for you?

What are the thoughts of other people who are already working in the field. So for that check links:

(1) http://www.onlineaspect.com/2007/07/10/image-storage-database-or-file-system/
(2) http://stackoverflow.com/questions/561447/store-pictures-as-files-or-in-the-database-for-a-web-app

Regards,
VSS
0
 

Author Closing Comment

by:westdh
Comment Utility
Thanks
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Normally the drop down box control found in the .Net framework tools is able to select just one data and value at a time, which is displayed on the text area.   But what if you want to have multiple values to be selected in the drop down box? As …
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
This video discusses moving either the default database or any database to a new volume.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now