Solved

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

Posted on 2010-08-22
6
380 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 7

Accepted Solution

by:
Norush earned 125 total points
ID: 33496164
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
ID: 33496683
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
ID: 33497386
I believe the database is better also... but why I am not sure.
0
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 
LVL 10

Assisted Solution

by:Espavo
Espavo earned 250 total points
ID: 33498318
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
ID: 33498425
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
ID: 33500401
Thanks
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A basic question.. “What is the Garbage Collector?” The usual answer given back: “Garbage collector is a background thread run by the CLR for freeing up the memory space used by the objects which are no longer used by the program.” I wondered …
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

724 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