How to save a PDF file received via API?

I use PDFShift for convert url to PDF file.

In receive I got answer with content-type application/pdf.

But I didn’t find how to save this application/pdf response on my project server as PDF file?

What Wappler component can do this?

Take a read.

As far as I understand, this extension works with a url, but the file itself comes to me via the API.

It looks like you can save the file to AWS S3 … take it from there.

1 Like

Thank you, I also saw this option, but I thought there was some more direct way :slight_smile:

If you have time, it would be good to know the steps you had to take to set this method up in order to save the PDF.

Thanks!

In general, everything is quite simple here.
First, we specify the “filename” field with the file name along with the .pdf extension in the request to the PDFshift service, then using the add-on we save it to a folder (you just need to create the folder in advance)


I had some problem with how to correctly extract the file name from the full link - I didn’t find any suitable functions in Wappler, so I simply compiled it manually again and passed it back in a separate full_path variable

2 Likes

Thank you so very much! Your time and help is very appreciated.

1 Like