i have an html page.Which is actually an profile viewing html page. Where there is an profile picture. I want to upload option on-click of profile image and save it in my system.For now i am running it on my system only.
<ul>
<li class="name">
<input type="file" id="my_file" style="display: none;" />
<img src="../../static/img/profile-img.jpg" alt="Shri"> <a>{{ .userName }}</a>
</li>
<li class="logout"><a href="/logout">Logout</a></li>
<li><a href="#">Contacts</a></li>
<li class="last"><a href="#">Help</a></li>
</ul>
I should get image upload option if i click on this image(current image) and i want to save uploaded image. This i need in any case please help me to do this.
I think this is what you are looking for:
Tell me how it goes.
//UPDATED ANSWER
If you want this to work you have to use Jquery and include it on tag.
Also include the jquery function on the head tag:
In your html code you have to write your code: