Click here to Skip to main content
12,893,190 members (55,324 online)
Rate this:
Please Sign up or sign in to vote.
See more: C C# ASP.NET
Hi ,

I am planning to do image upload . Which method will secure & Performance consideration??

Whether we will upload the files in the server, and store the name in db or

Upload the image in db itself..

Second thing , Whether compressing the file before upload will be good in performance for both cases (server upload , db upload).

Posted 17-Dec-12 1:24am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

As far as performance is concerned storing images in Database is not advised, because you have to convert them into binary object before stroing into DB. Storing image names in DB and physically storing images on server is always considered better.
sarathkumarnallathambi 17-Dec-12 23:05pm
Thank you. But converting the file into zip and then upload will reduce performance or not??
zafar sultan 19-Dec-12 6:09am
You will first compress the file, convert it into zipped format ant then upload, ask yourself is it feasible? I don't think so. Images should only be compressed when they are of bigger size. Compressing small size images does not make any sense.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

I agreed to zafar sultan643, Also I advice to upload image of limited size. Put validation for 50KB before uploading the image on to the server.

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

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170424.1 | Last Updated 19 Dec 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100