-1

I have developed a webpage wherein, i want to upload an image "onClick" event. Much like facebook does for their change profile picture functionality.

I want to be able to click over the image and should be able to update that picture on my webpage.

Please help me with some sample tutorials or blogs, which may point me in right direction.

Any help will be truly appreciated.

Thanks

Shailesh
  • 3,072
  • 3
  • 24
  • 33

2 Answers2

0

You can do this with one of our demo sites: http://video-conference-demo.herokuapp.com (sign up & change your profile picture)

The way you do it is to use something like JQuery File Upload will help you achieve this. However, you'll have to set up the backend to support the handling of file uploads

Hope this helps - if you submit some code you've used, we'll be in a better position to help

Richard Peck
  • 76,116
  • 9
  • 93
  • 147
0

Please try searching your question/query over this site and google before posting! By the way, you can do this through jQuery very easily.

Easiest way could be adding a form with enctype="multipart/form-data" and use a submit button.(ofcourse you will need to add a input field of type "file").

Give this submit button & input[file] button a id, so when a user click on its display picture then emulate onClick event on the input[file] button through jQuery. Keep the form hidden through CSS.

Have a look at this: How can I upload files asynchronously?

Community
  • 1
  • 1
Kush
  • 755
  • 7
  • 22