admin管理员组

文章数量:1425161

When you try to copy and paste to Safari web browser the browser inserts webkit-fake-url.

In Chrome, you could do getAsFile() on the clipboard data to read the image. Can you do something like that with Safari?

When you try to copy and paste to Safari web browser the browser inserts webkit-fake-url.

In Chrome, you could do getAsFile() on the clipboard data to read the image. Can you do something like that with Safari?

Share Improve this question edited Feb 4, 2013 at 6:27 alex 491k204 gold badges889 silver badges991 bronze badges asked Feb 4, 2013 at 5:20 SamFisher83SamFisher83 4,0159 gold badges41 silver badges53 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 4

Nope, it's impossible to access the pasted file's contents in Safari at the moment.

As a workaround, you can detect that faux protocol and display a message to the user informing them that it doesn't work when using their particular browser (and perhaps show a normal upload control).

本文标签: javascriptHow to fix webkitfakeurl meanStack Overflow