0

How to choose avatar image from images directory?

asked 2016-09-27 15:07:16 +0800

lramellavotta gravatar image lramellavotta flag of Italy
200 1 8

Hi, I'd like to enabling the users to choose an avatar from images/avatars directory located to the server. I mean, where do I start?

Thanks, Luca

delete flag offensive retag edit

3 Answers

Sort by ยป oldest newest most voted
0

answered 2016-09-28 06:47:56 +0800

Darksu gravatar image Darksu
1991 1 4

Hello lramellavotta,

I would recommend saving the images in a database as BLOB.

http://www.mkyong.com/hibernate/hibernate-save-image-into-database

And then it is pretty simple to load the images:

https://www.zkoss.org/javadoc/latest/zk/org/zkoss/image/AImage.html

If you need more help or still want to load the images from the directory let me know.

Best Regards,

Darksu

link publish delete flag offensive edit
0

answered 2016-09-28 06:48:27 +0800

chillworld gravatar image chillworld flag of Belgium
5322 4 9
https://github.com/chillw...

Hey Luca,

I should just fetch your avatars from the server side and then show them in the gui as images.
If you google you can find easlily on how to fetch files from a location.
You can use a grid with custom renderer (like this you can add more avatars to one row) and a button under the image to choose it, or add an event on the image itself.

Personally I will not show what's on the server side itself like folders,...

Is this enough or do you need more exact details?

Chill.

link publish delete flag offensive edit
0

answered 2016-09-28 14:00:41 +0800

lramellavotta gravatar image lramellavotta flag of Italy
200 1 8

Thank you for your many comments. I tried to store image in BLOB.

Luca

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2016-09-27 15:07:16 +0800

Seen: 23 times

Last updated: Sep 28 '16

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More