I was trying to add a button to download an attachment from a mobile app I am building from Retool Storage. Every time the query is triggered it runs fully but nothing happens either on the dev env or while running it on an actual device.
The same query runs perfectly on the web app.
On the mobile app, while using the View content of the file method, I can receive the response.
Can anyone please help me understand how to get this working?
I am having the exact same issue. I have tried just about everything I can think of and nothing seems to allow this behavior.
Hey @Nick_Edwards @amany112 have you tried using a JS query on success of the
Get contents of a file. The utils.downloadFile should work in mobile apps.
@joeBumbaca How can I do this to handle different file types? Like its possible for my use case that the file to be downloaded is a PDF or JPEG etc
Yep! The code above was just an example, but you can set the file attributes with whatever values you want. The RetoolStorage query should return all the information you need, and you can dynamically set the file type. Here's a bit more of a fleshed out example.