Get binary data from exported images and videos

Hi, is there a way to get the binary of the exported image/video? I tried to make an XHR blob request to the Link from XPMobileSDK.getExport but ran into CORS issue.

Hi Clinton,

I’m not sure we have tested to download the exports trough JS code.

Is this link working in the browser url directly ?

What is the exact CORS error ?

Hi Clinton,

I’ve tested this with code.

I think I’ve reproduced your behavior.

I’m receiving an error “Failed to load : No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘null’ is therefore not allowed access.”

In order to overcome it, you should modify the Mobile server in order to declare supported origins.

In the server .config file, there is a key:

You could try with :

If it is working, you could just add your origin there (instead of star to allow everything).

Star worked on my side :slight_smile:

Hi Petar, followed your steps and it worked on my side as well. Thanks again! :slight_smile: