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.