• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Uploading an image to a server or to database?

 
Greenhorn
Posts: 14
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Rancher
Posts: 4803
7
Mac OS X VI Editor Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic