Solved

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

Posted on 2010-08-22
6
375 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
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
Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

 
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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
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…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

809 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