Home > Software design >  How to upload a link of file in postman instead of downloading file in Django
How to upload a link of file in postman instead of downloading file in Django

Time:01-04

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.

CodePudding user response:

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.

  • Related