How to upload a link of file in postman instead of downloading file in Django

Question:

I created an API, that take xlsx as input file for post method and give me edited xlsx file.

Problem is:- File I got from link and I have to download the xlsx file every time and put in postman.

What I want:- directly put link in postman for input file

Note:- Everytime link contains only one xlsx file

I Looked for the solutions in documentations , but I can’t find a thing, of How to put link for inpt file.

Asked By: ZAVERI SIR

||

Answers:

To use a link to a file as the input for a POST request in Postman, you can use the "Send and download" feature in the "Body" tab of the request editor. Here’s how you can do it:

In the Postman request editor, go to the "Body" tab.

Select the "binary" option from the "Type" dropdown menu.

In the "Value" field, enter the URL of the file you want to use as the input for the request.

Check the "Send and download" checkbox.

Send the request as usual.

The file specified by the URL will be sent as the request body, and the response will be the edited version of the file, which you can save to your local machine.

Please note that this approach will only work if the server you are sending the request to is configured to accept a URL as the input for the request, and if the server has the necessary permissions to access the file at the URL.

Answered By: RAK

You can pass the link with a header or just do one thing create an environment variable in postman itself and try to create that variable updated after every hut of the API by getting a response from the other API.

Answered By: August Infotech
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.