How to create Video Download button from URL

Hi,

So I am trying to create a Download action button on one of my tables. I have read the docs and am familiar with how utils.downloadFile works.

The problem is that my video is a URL link to the video, and utils.downloadFile requires a base64 encoding.

I am not sure how to get my URL link to this format.

You can avoid all of that by just using the Go to URL event handler.

image

Set open in a new tab and depending on how the user has his browser configured, it will either download immediately, or open the file in another tab ready to download.

Thanks for the suggesting, this would work but for my users browser it opens it in a new tab rather than downloading it, and I would like the option to name my file

You can get the file from an API source like S3 into a base64 with some work, but only with files smaller than about 50mb (part browser limit part Retool.) Since you are working with videos, you will probably hit that limit a lot as I do when I am uploading videos. Basically using a Browser and Retool as an intermediary for your files is very inefficient.

I know the option I offered is imperfect, but it may be the only one available. Most of the time when I click a video URL in my Retool apps, it downloads. Google a little to see how this works and then see if you can get your user to apply it and thus you save and tab. Your user will have to change the file name themselves however.

1 Like

Hey folks! Including a util for downloading specifically from URLs is something our devs have taken a look at in the past, I can bring it to their attention again and let you know here if and when it's included :slightly_smiling_face:

3 Likes