How to make a Force Download HTML Element?

Does anyone know how to make a forced download HTML element work here on Bubble’s platform? I don’t want it opening up in another tab or just opening up the link. I want it to force a download.

This HTML code works on other websites (I added spaces so you could see the code on here):
< a href=“yourfile.pdf” download >Save PDF

But when you do so in a HTML Element here, it just opens up the link.

Cheers

1 Like

If you click on the PDF component, it should let you access the file’s URL (which is the URL for S3). You can specify that, and it should give you the option to download.

However, Bubble adds in the apps domain name when you do that, which messes up the URL. (ie. instead of //s3.amazonaws.com/appforest_uf/… you get appname.com////s3.amazonaws.com/appforest_uf/). Then, the download fails.

I haven’t figured out a workaround for that, but thinking someone reading likely has an answer.

3 Likes

I’ve asked a similar question before but haven’t received a solution. What would also be great is to be able to do this on a list so selected files/links could all be downloaded.