Forum Documentation Showcase Pricing Learn more

How to download a file - saved in DB?

Maybe it’s just late at night and I can’t figure this out, however I have a ADD FILE page, which adds a file (word / pdf document). This is stored in the DB along with user email.

I want to show a list of files that the user has uploaded and allow the user to download the file. I am using Repeated Group functionality to show list of file names in a list - however how can I add a “Download” button and let the user download his file?

I am stuck.

Just use a link element and make it so thst it opens in a new tab.

1 Like

Thanks for that tip. I tried adding the link element, however I can’t make that work. After adding the link element, it asks for an internal or external page - whilst the files I want the user to download are stored in the DB and do not have their own page.

Is there a walk-through / tutorial / example for this, please?

We don’t have a tutorial for that one yet, but the trick is that a file saved in the db is actually a link. So of if you make your link open an external page, and make that link equal the value of the file you want your users to be able to download that’ll do it.

1 Like

Still struggling with this one. Here’s what I am doing - I have uploaded two files and want to see these on a page:

  1. Created a RepeatedGroupUserCV (UserCV is where I store User’s CV when they upload as current users)
  2. Added a link element through drag and drop
  3. Added Dynamic external link with criteria “Current cell’s UserCV’s CVFile”

And the result looks blank :confused:

I wonder if, when I save the CV - I have to tell the workflow to save it against this logged in user and not assume that it will be assigned to the current user.

You’re almost there! just click “more” at the end of this expression and add URL


Also, make sure the data is correctly saved in the App Data Tab

1 Like

That works! Thanks @vlad . It’s UserCV’s CVFile’sUrl that gives a link to the download - if it is word document, it downloads automatically. If it’s an image, it opens in tab (I don’t care about images in my app)

1 Like

Hey, thanks. I figured out the data had the correct workflow and is stored properly at the moment.

1 Like