简体   繁体   中英

How to access clipboard image and save it at server location in asp.net web application?

I wish to have the following feature in my web application: On the client side When I copy an image from anywhere (it gets loaded to the clipboard), now I wish to have a button on which when I click it should save the image at the server location at some path. I am ok to use anything javascript, jquery, c# at server side code just need the implementation of the above feature.

Please help. Thanks a lot in advance.

Vaibhav

Check out this question and answers to it: How does the paste image from clipboard functionality work in Gmail and Google Chrome 12+? .

I think the most difficult part is to get it working in all browsers. So if you need older browsers support you probably should use some flash solution like http://code.google.com/p/zeroclipboard/ .

To save it to server you need some controller's POST action (if using MVC) or webservice or aspx page if using webforms. After getting clipboard image with javascript you send it to the server using AJAX for example.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM