Unfortunately the platform makes the annoying solution easy, and the one you prefer hard.
D'n'd and forms give full access to the image data relatively easily, and it works completely client-side without server's involvement.
OTOH due to same-origin policy getting data from a random URL on the Internet is (intentionally) hard. "Simple" proxying via own server is tricky to do without accidentally building tool that could be abused for DoS or anonymous download of something that you wouldn't want to be associated with.
Good points, I hadn't thought about the app being completely client-side and the restrictions that entails.
Still, in ye olde times, it was pretty common to accept image URLs. You might be able to do some fairly simple rate limiting on the proxy to help prevent abuse. Maybe the net was just a more innocent place back then.
Anyhow, if it only works with images dragged from the user's local computer, it should really say so. It's especially confusing on Chrome, where UI cues like the mouse cursor changing suggest that dnd between windows should actually work. It generates a drop event and everything, although it appears that the DataTransfer item just contains the image URL and not its actual contents.
D'n'd and forms give full access to the image data relatively easily, and it works completely client-side without server's involvement.
OTOH due to same-origin policy getting data from a random URL on the Internet is (intentionally) hard. "Simple" proxying via own server is tricky to do without accidentally building tool that could be abused for DoS or anonymous download of something that you wouldn't want to be associated with.
reply