Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Uploading an image to a server or to database?

 
harbir hundal
Greenhorn
Posts: 14
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I am trying to implement the profile page for the user of the web application.
I want the user to be able to upload the image for their profile.
My question is that how should this be implemented?
Should I upload the image in the database as a blob, or shall I upload the image in the server and store the path in the database?
What should be the optimum size of the an image, for user profile?
I am using the following.
1. Mysql 5.5.11
2. Spring 3
3. hibernate

Your help will be appreciated.
Regards
Adofo
 
Pat Farrell
Rancher
Posts: 4678
7
Linux Mac OS X VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you mean a small icon/photo, say 60x60? Its so small that it makes no difference which you pick.

This is purely an engineering decision. Normal tradeoff. The obvious advantage of using a blog in MySql is that you don't have to think about managing the data. If you store it as a file, you need to manage the file structure, take care of when it gets full, fix broken links, etc.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic