I have a custom Google search engine for images only. I want to make it so that when a user clicks on one of the images, the clicked image gets downloaded to the server.
How do I do this?
I have heard that you can use Javascript or JSON to do this but I am not exactly sure how.
Tried some Javascript - but it didn't work - it's my first time making a web app so I am new to this type of stuff
If you don't know what to do - can you please give me at least some sort of hint at what you think might be the solution to this
Update
Basically I want to save the image so that I can display it somewhere else in my website.
Try this may help you. Here image will be downloaded to specified location instead of server.
<div id="download">
<img src="http://www.edudemic.com/wp-content/uploads/2014/05/google.jpg" id="image" />
<a class="http://www.edudemic.com/wp-content/uploads/2014/05/google.jpg" download="smile.jpg">Download image</a>
</div>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.