Click here to Skip to main content
15,895,011 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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

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.
 
Share this answer
 
Comments
Sarathkumar Nallathamby 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.
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.
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900