Stefan Weiss
3/17/2016 1:35:00 AM
On 03/17/2016 01:04, Thomas 'PointedEars' Lahn wrote:
> Herbert Kleebauer wrote:
>> If the picture is on a different server, there seems to be
>> an access violation. How can I avoid this violation
>
> You cannot. The whole point of the Same Origin Policy is to prevent people
> from doing things like what you attempted.
The same-origin policy is a security feature; it has nothing to do with
copyright.
>> or in which other way can I read a binary file from a different
>> web server into a javascript array.
>
> I know how (it is actually trivial if you think it through), but until I am
> certain that you are not attempting a copyright violation through the back
> door, I will not say.
I'm curious. Without CORS, I can't think of a way to get a byte array
from an image on a different server. XHR won't work, and neither will
image â?? canvas â?? data. What's the trivial solution?
- stefan