I'm using the DragAndDrop interaction in OpenLayers. I'm trying to drop an image that contains a geospatial location in its metadata to create a feature out of it.
I created a Format to read the file using the Exif-JS library. By default, Format objects in OpenLayers read the content of files as text.
How can I take the returned text and convert it back to a blob or an ArrayBuffer ? Exif-JS won't recognize a string.
I am not allowed to edit the library, but while testing, I confirmed that returning reader.readAsArrayBuffer(file);
was working fine to recreate a blob and send it to the exif-js library.
Is there a way to make it work with OpenLayers converting the file as text first?