on-internet
← Community

Javascript to simulate "right click on image -> save image as"

Stack Overflow ·

There has been an exact duplicate question as this one, but it's been 2 years, and there's only one answer which was not really a solution. I have an image (thumbnail). Right below it there are 2 buttons: View and Download. View will open the image in browser (cached). And the Download button will open the Save Image dialog. Right now I'm using PHP's header Content-Disposition: attachment; for the download button. Generally, visitors will first hit the View button to preview (thumbnail is not a solution since details and quality need to be verified), especially for my own app. Now, I don't rea

Comments

Sign in or sign up to comment and upvote.

No comments yet.