Hello. Thank you for the response. I am successfully getting the file with GET, but then need to use that same file in the next POST request (ideally without downloading the file locally). The error I am getting when I try to end the POST request is:
{
“code”: 3660,
“message”: “No file found in the request. Please include a file and try again.”
If I understand you correctly, what you are trying to do is to upload a file to a server using the URL of the file directly on Postman.
This is an interesting use case, but I do not think Postman currently supports it.
Ideally, when you upload a file using form-data or binary over an HTTP request, what you send is a blob or a base64 string of the file. Postman makes this more convenient by allowing you to select a file locally and does the conversion for you when you make a request.
I am guessing that you are using this file in an automation flow which is why you want to avoid downloading it locally?
My solution might be quite hacky but it works. It involves you first converting the file to base64 when it is fetched, then you save this in your environment. You can then retrieve this base64 string from your environment when you want to upload it.
Create an environment for this and add a convenient variable name. In my case, I used filebase64.
Send a GET request to the image and add some postman scripts to the Test tab which runs after the file has been fetched. The script simply gets the base64 of the file using the dataURI method and saves it in the environment.
Thank you!!!, I will try this tomorrow. What would be theoretical maximum PDF file size be using this method? I imagine there is a limit to the max string length for variables?
The maximum payload size should be mostly dependent on the server. Some servers default to 100kb, but it can be increased. Postman allows you to send up to 50MB by default, but this can be increased in the settings tab.
I do not know if there is a limit to how much data can be stored in an environment variable, but I did a quick search and saw someone who stored over 200kb which is quite good.
Hi, regarding “Zoho API allows you upload a file as a multipart/form-data by specifying it’s URL.”. Where did you see this documentation? I have tried many times without luck.