How do I download files

that have been uploaded by other users in the app. The file type would typically be excel and pdf type

thanks in advance

You can do this using a link element, with the dynamic data being in this format (here File is the data type, and Document is the field where the file is stored):

Here, after you select the field where the file is stored, click ā€œmoreā€ and youā€™ll have the option to select ā€œ's URLā€.

Then you can style the link to look like a button, and that should do it. :slight_smile:

5 Likes

thx, and what if there are multiple files (since stored as list of files)?

You would use a repeating group (with the data source being that list), and within each cell is the link element. The dynamic data would be: ā€œCurrent cellā€™s Fileā€™s Documentā€™s URLā€, and the User would be able to save each file individually.

The link elementā€™s text could include the name of the file as well (instead of just ā€œDownload Fileā€), to show the User what they will be downloading. The dynamic data for the file name would be ā€œCurrent cellā€™s Fileā€™s Documentā€™s file nameā€, instead of ā€œ's URLā€.

5 Likes

I love your directions @fayewatson. I have spent days and days and days and days reading forums with bad advice on my email issues. After 16 days, nobody can answer my question and Iā€™ve probably spent 30+ hour reading and troubleshooting.

Then when I read stuff by youā€¦ everything works in 30 minutes. Itā€™s clear and concise and easy to follow with your screenshot. Youā€™re awesome!!

5 Likes

@fayewatson I literally look for your name now when Iā€™m trying to figure something as I know the problem will be solved in a matter of 1 hour and not days :slight_smile: Thank you!!

2 Likes

Aw, thatā€™s so kind, thank you @mgray! :slight_smile: So glad to hear they are helpful! I for sure can only give those examples because of all the awesome posts and examples that other Bubblers made in the forum when I first started out - would be lost without them! I know it feels like a lot of reading sometimes, but over time it all starts clicking and the time spent is absolutely worth it!

1 Like

@fayewatson have you been able to successfully use this same aspect with SelectPDF? Iā€™m stuck at a point where I can create the PDF (through SelectPDF and my Workflow) but when I want to use a Link Element to download the PDF in a browser or download it, all I get is https://file_name.png. Obviously things arenā€™t pointed in the correct direction, but Iā€™m not finding solutions on the forum or video content from Bubble.

Have you dealt with this at all?

Hi @hattford, Iā€™m so sorry I havenā€™t used SelectPDF very much before :worried: I hope another Bubbler knows the answer!

1 Like

Perhaps just go into the app data interface and ā€œSeeā€ the file. That will expose its true URL. Then you might see where things are going wrong for you.

(You donā€™t say how it is that youā€™re coming up with the fileā€™s url as just being protocol//filename. That would be useful info. This might be one of those ā€œoffer to expose your editorā€ things. The issue youā€™re having doesnā€™t relate to Select PDF. Itā€™s about file handling in Bubble.)

Hi, some browsers are blocking the file tab from opening when you click the button. Is there another way to download the file?

1 Like

Did you have any update on blocked download ? thx

It seems working only with PDF files. I have tried it with .xls and .doc and it was blocked.