Hiring for a simple problem I can't figure out

Hey guys

I’ve been using the PDF Generator plugin to create PDF’s from URL’s.

It works great and converts my URLs to PDF as intended.

Problem is, I can’t figure out how to save the PDF to my S3 database.

I’m a dummy so I it would be great if someone could talk me through the solution!

Please DM me with a price if you can help with this. Cheers.

Sounds simple enough to just suggest on :slight_smile:

Where are you stuck, exactly?

1 Like

Hey Vlad!

So far this is the workflow I have:

In step 1 the plugin generates the PDF and provides a download link, which if you click it automatically downloads the PDF you just generated like so:
https://v2.convertapi.com/d/1b7844101a83915096cfa9b9388fe172/test.pdf

Step 2 I save the download URL.

And step 3 is where I’m stuck on trying to save the actual PDF file to my server.

I don’t understand how to get the PDF to download directly into my S3 database after it has been generated?

My current step 3 you see in the workflow just saves the download URL to my File’, not the actual PDF file itself.

I hope that makes sense? Really appreciate the help Vlad!

I do not see what you’re doing on Step2, but there you need to run the following operator (that you’re already running on Step 3)

You’re trying to run it AFTER, and that’s an extra step, plus it looks like you’re confusing the function a bit :slight_smile:

Get the initial (external) PDF URL (Step 1), and use the :saved to S3 operator (Step 2) to save it to Swipefile “File” field.

Remove the “URL” ending of the operator, and you should be good - the " :saved to s3" should take the external file and save it to your Bubble app s3 bucket.

Otherwise, let us know :pray:

Ah I see!

So this is the workflow I have now with your instructions:

But I now get this error when I run it:

As you can see from the first picture, the generated pdf is contained in ‘Files’>‘Url’ and ‘Url’ evaluates to a list of files.

So I also tried writing “:last item:saved to S3” after ‘Url’ to see if it might be a problem with saving a list of files instead of one single file but it still gives me the same error.

Do you know what might be causing this error?

Thanks again for your help Vlad, it’s greatly appreciated :pray: :pray:

Little weird that this plugin returns a list of PDFs, but I’d try doing First item instead of last item and see if this works.

Screen Shot 2020-06-03 at 16.09.03

Yeh I found that strange too. Unfortunately ‘first item’ still gives the same error:

Really frustrating… Any ideas?

Nope, but please check out your console output in the browser - that may give some more info on what exactly is the issue\exception (if you’re on View>Developer>Javascript Console)

Sure, these are the errors I found in the console:

Do you know what it means? I’ll also get in touch with the Bubble team to see if they can make any sense out of it…

Good think you asked Bubble - they may suggest if it’s related to the plugin or something else within their stack.

Sorry for your trouble!

Yes hopefully we’ll get it sorted. Thanks a lot for your help, you’ve been very generous!

1 Like

Hi, did you ever manage to sort this out? I am working on the same thing right now (trying to create a preview for a file); I can create the preview, and the link, but I didn’t yet manage to automatically download and save it to my database.