Downloading external images from another domain

Can I upload an image (jpg, png, gif) from another domain and manipulate pixels? I think when the image is uploaded / copied, it is in my domain.

Using Loader and add content to the Image component, I get an error message in my debugger. I assume there are several cross-domain policies here.

But I need to be more confident how this works before moving on. I think if I cannot upload the image directly, I could create a local proxy.

Can someone please enlighten me?

Thanks in advance.

+3
source share
2 answers

, , ( crossdomain.xml ), , .

:

var loaderContext:LoaderContext = new LoaderContext(true);
var loader:Loader = new Loader();
loader.load(new URLRequest('http://someserver.com/yourImage.jpg'),loaderContext);

- , . .

,

+7

crossdomain, php, CURL -. , , . , .

+1

Source: https://habr.com/ru/post/1729133/


All Articles