Click here to Skip to main content
Rate this: bad
good
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).
 

Regards,
Sarathkumar.N
Posted 17-Dec-12 1:24am
Rate this: bad
good
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.
  Permalink  
Comments
sarathkumarnallathambi at 17-Dec-12 23:05pm
   
Thank you. But converting the file into zip and then upload will reduce performance or not??
zafar sultan at 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
good
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.
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 540
1 Sergey Alexandrovich Kryukov 432
2 Yogesh Kumar Tyagi 384
3 Prakriti Goyal 280
4 Maciej Los 205
0 OriginalGriff 6,472
1 Sergey Alexandrovich Kryukov 5,404
2 Maciej Los 3,434
3 Peter Leow 3,259
4 DamithSL 2,495


Advertise | Privacy | Mobile
Web04 | 2.8.140721.1 | Last Updated 19 Dec 2012
Copyright © CodeProject, 1999-2014
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