I could use some help with downloading an attachment from a URL and then uploading it using the http module.
I can successful get the attachment data from a URL using the ‘Download Attachment’ http module, see below.
However, when I try to then using the data in a ‘Make a request’ http module to make a PUT call to an API to upload the file I cannot get the file to successful upload.
I think there is an format/encode issue. The API documentation for the PUT call I am making says the file being uploaded must be byte. Below is an example of the file upload from their API.
Hi @gregg_a and welcome to the Make community!
Could you share the error message you’re getting and your module settings?
I see your file name includes a special character(double quote). Have you tried a different file name (without quotes)?
I’m actually not getting an error message from the http module. The API that I’m sending the PUT request to is very bad at returning errors.
I’m not passing the file returned by the Download Attachment http module. See below with the attachment info I’m using in the input for the http module PUT call to upload the file.
@gregg_a Please share either a blueprint of your scenario or at least a screenshot of it and of the settings of your modules, along with their output. Without this information, it is very difficult to help you. Thank you.
A little shot in the dark in the meantime, but is your Body Type in your HTTP POST module set to multipart/form-data?
Thanks @gregg_a I’m sorry I don’t really have much time to help now. Just putting your json string through a validator shows 2 extra spaces there (in yellow):
@samliew the screen shot in your last post is the GET call where I’m downloading the attachment from API #1. I then need to upload that attachment to API #2 using a PUT call.
I can successfully upload an attachment to API #2 using a PUT call I have setup using a http module when I hardcode the attachment being uploaded.
What I cannot get to work is using the data from downloading the attachment from API #1 and then using that data to upload in the PUT call to API #2.
The 1st picture below shows the data being downloaded from API #1.
I just want to quickly say awesome work figuring this out with the guidance of @samliew
Thank you very much for keeping the community in mind and for stepping back in here to share what did the final trick for you. This could be incredibly helpful to many other users who are looking for the same info in the future