Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 384
  • Last Modified:

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

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
westdh
Asked:
westdh
4 Solutions
 
NorushCommented:
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
 
EspavoCommented:
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
 
westdhAuthor Commented:
I believe the database is better also... but why I am not sure.
0
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 
EspavoCommented:
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
 
Vikram Singh SainiSoftware Engineer cum AD DeveloperCommented:
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
 
westdhAuthor Commented:
Thanks
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now