Hello!
I have a mobile app that is offline enabled and I have a use case where a JS query is called and iterates through an array of images to upload and for each one it then triggers another S3 Resource query which actually uploads the data. Both the top-level JS query and the S3 Resource query are marked with Offline Type as "Write".
The behavior that I am seeing with this setup that is strange is that when the app is offline and the JS query is triggered we are seeing errors from the nested S3 upload calls with the message "unsupported url". Then when the app goes online the pending job is marked as successfully processed but the images never actually get uploaded to S3. I wouldn't expect that the nested S3 upload queries would actually get triggered in the offline use case and if they were then they would not actually attempt to make the upload since its marked Offline Write.
After investigating the app and network logs it that the "Upload Data" action under the hood has a dependency on generating a Pre-signed URL and then it makes a subsequent request to upload the data with that URL. In offline mode this is causing issues because it is attempting and failing to fetch the initial URL even though the app is offline and should skip that step.
I am wondering if at a high level this is a valid approach to take for this use case and if there are any suggestions for better approaches to get this offline S3 image upload use case working? Happy to share more details on the setup!
Thanks