My goal:
I have loaded the exif.js (exif-js ยท GitHub) library
I want to use EXIF. to read the GPS data from images I have loaded into the Retool Storage and are being returned in table7
Issue:
EXIF needs a image object but I believe I can't use
getElementById() in Retool
and when I try and create an image object and set the src to the URL it does not work.
Steps I've taken to troubleshoot:
I've tried manually creating the image
var theImage = new Image();
theImage.src=table7.selectedRow.url;
I've tried
var theImage = document.createElement("img");
theImage.src=table7.selectedRow.url;
I've tried var theImage = await utils.getDataByObjectURL(image2.retoolFileObject.url);
when passed to EXIF they all return nothing
Additional info: (Cloud or Self-hosted, Screenshots)
Cloud
Welcome to the community, @Suzy_Bates! Thanks for reaching out.
It looks like the particular library you're using is most easily integrated into an app where you have access to the document, which isn't the case inside a Retool app. There is a blurb in its documentation, though, that mentions it may be possible to pass in a File or Blob object.
Perhaps there should be some documentation about how trying to access anything from document.x is not allowed in Retool and it's NOT that you are losing your mind.