How to upload/link a pdf

It appears that the only way to upload a pdf into a link in an element is to first upload it with the file manager, then click on it to copy the address, then paste the address into the element link. That’s rather tedious when I have 15 pdfs and expect to update them from time to time.

Is that the only way to upload it? An image element has the ability to upload directly, is there a similar way to upload directly from the link element?

Thanks

Hi there! I had exactly the same issue so I created a plugin that does exactly that. Feel free to check it out!

Sounds interesting. I clicked on your links. Is there an actual demo to see how it works? Not sure exactly what it does.

Yeah sure! im still working on providing a proper demo. This is because to use PDFShift, you need to have your API keys and the free version has I beleive 50 free converstions. I could make a demo where each feature is shown but that 50 conversion limit would hit pretty quick if its public hahaha.

Lets see what I can do, maybe a small video showing it in action might help?

Hey there!

I recorded a small video showing a little demo of the actual plugin. Hope this helps, and feel free to let me know if there is anything else you would like to see. I had 5 minutes on the free loom plan to record this so excuse me if I sound like i’m rushing hahaha.

https://www.loom.com/share/410885184f674bc4b3668c00af384634

Just read your question again, sorry if my reply was a bit unrelated hahaha. I thought you meant turning links into files. Here is an answer to your question as well.

In Bubble, the link element itself usually does not work like an image uploader. A link needs a URL, so the normal options are:

  1. Upload the PDF in File Manager, copy the file URL, then paste it into the link.
  2. Add a File Uploader element to your app and save the uploaded PDF URL to the database.
  3. Use a dynamic link like Current cell's PDF file or Current Page Thing's PDF URL.
  4. Store all PDFs in a data type, then display them in a repeating group with each link pointing to that file’s URL.
  5. You could even use custom states on the page to store then set your link elements url to that files url.

For 15 PDFs that may change over time, I would not paste static URLs into each link. I’d create a data type like Document with fields:

  • Title
  • PDF File
  • Category
  • Updated Date

Then upload each PDF once into the database and make the link dynamic. When you need to replace a PDF later, you only update that database record, and the link updates automatically everywhere.

So short answer: for static links, yes, File Manager + pasted URL is the usual route. For anything you’ll update, use a database/file uploader setup instead.

That looks an interesting way to handle the links, thanks.

So does that mean the plugin takes a template and adds dynamic data, such as an invoice and data? I will need that later on.

Yes exactly!

I’ll give an example for my use case. My website requires customers to be sent a receipt of their order by email. I have created a separate page on my bubble app called invoice order page (this can be whatever you want). On the page I have a little template I made of a receipt. All the fields on the page are dynamic, for example “Current pages orders customer’s name”. The way it does that is I have the pages type to be set to my orders data type, so on PDFShift Pro i just set my source url to my hidden pages url/ordersuniqueid. (or whatever your setup is). What PDFShift Pro allows me to do with this is it opens the window, fills the dynamic data according to the pages order, then saves the page as a PDF and returns the PDF’s file URL which can be saved to your bubble database.

The use cases are endless this is just an example, you can even protect the pdf with a password using the plugin. The way the pdf looks will be exactly how you design your url page or html block if you use one.

You can use a file uploader element in a workflow to save the file to the database, then use the dynamic expression for link element to reference the saved pdf url.

Yep, that’s right, you can achieve the same thing using custom states or repeating groups. Simply by setting somethings state as a file or doing a search for your file and refrencing the link in a repeating group to that parent groups file. Completely depends on the use case!