Download a pdf to server from an API source

I’ve got a process that a user fills out a form from an api source and then after the form submits I want to download that pdf to the server on our side. So I want to do everything server side, ie I don’t want them to have to do anything client side. Is this possible from the download files action? I have a really squirrly work around where I have them click a button that copies the URL link of the pdf and then they paste it into dropzone to upload to server. But its kind of hanky. Looking for an alternate method for this process.

Or would I be able to make this work if the image/pdf ended up as an S3 bucket source? My api vendor has option to store the files S3. I haven’t done much with the s3 up and down loads actions from wappler, but didn’t know if that would work as an option.

Hi,
S3 seems like the best way to do it. Although I am not sure if you can actually upload from a URL in server side.

If you are on PHP or NodeJS, you could write a custom extension to download the file server side - from the URL send via GET/POST. And then use that local path to upload to S3 if needed.
Sending of this URL could also be automatic on success of the form success. So user does not have to do anything extra.

The pdf will be on api side, so would have to download to server on our side. Not sure I have the skill set to write a custom extension, and I’m using asp…