I/O Error when loading an image with Loader from unmapped network address
We have this code in an AIR application:
var name:String = "file://networkfileserver/folder/image.png"; var _loader:Loader = new Loader(); | ||
| _loader.contentLoaderInfo.addEventListener(Event.COMPLETE,completeHandler); | ||
| _loader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler); | ||
| _loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler); | ||
| var loaderContext:LoaderContext = new LoaderContext(); | ||
| loaderContext.imageDecodingPolicy = ImageDecodingPolicy.ON_LOAD; | ||
| _loader.load(new URLRequest(name),loaderContext); |
This causes an IO Error with message Error #2035: URL Not Found. URL: file://networkfileserver/folder/image.png
Opening this very same address in a browser results in the image being shown (it gets converted into file://///networkfileserver/folder/image.png in Firefox, but it is still shown).
If we map the network folder, the image is loaded in AIR as well (as "file://Z:/image.png" for instance, which gets converted to "file:///Z:/image.png" in Firefox, not any other browser, but works in all of them).
If this was due to authentication issues, I would expect "file://networkfileserver/folder/image.png" to throw a security error, not an i/o one, and also for it not to load in any browser.
I tried adding a crossdomain.xml and a loaderContext.checkPolicyFile = true; just in case, to no avail.
Any tips will be greatly welcome.
Thanks!