Image Uploading in a web aplication [closed]
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this questionactually i m devloping a web application that provides facility to users upload the image as we see in orkut and facebook through a form and a upload button.but the actually problem I am facing is :
1.should i store the image in database using Large data objects ie BLOB and the problem arises of retrieving it back from the database and then displaying it on the form.
2.sholud i 开发者_如何学Cstore the absolute path of the the image in database and provide it to the source tag of the image in the html form.
I would advise against saving images in the database. This usually gives poor performance since files work better from the file system, data in the database etc.
It will also be harder to scale the database when the number of images grows than to just store them in a file system.
I would store the path to the file in the database, you can store a relative path and then have a constant in the web application to the root directory containing the images.
This will be of use to you. The Facebook engineers had a nice talk concerning Efficient storage of Billions of Photos
精彩评论