postman: Upload a file via POST request

Posted 功夫 熊猫

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了postman: Upload a file via POST request相关的知识,希望对你有一定的参考价值。

https://www.postman.com/postman/workspace/postman-answers/documentation/13455110-00378d5c-5b08-4813-98da-bc47a2e6021d

 

Upload a file via POST request

About this collection

This collection shows you multiple ways to upload a file in Postman. You can also watch this quick video below to see exactly how it\'s done.

The two examples here send a CSV file to the Postman Echo API in a POST request. In the body of the request, you can attach a file in one of two ways:

  • In the request body, click "form-data", hover over the "key" input field, and find the hidden dropdown that says "Text". Click "Text", and then change it to say "File". In the "Value" field, click "Select File" and select the file to send via the POST request body.
  • Click "binary" and then click "Select File" to attach your file.

These are basic ways to upload a file via Postman. The exact behavior for how an API is set up to receive a file depends on the architecture of that API and you\'ll have to look at the documentation to ensure it\'s done properly.

Watch a walkthrough here

POSTUpload a file

http://postman-echo.com/post
 
Bodyform-data
csvFile

g-LOr54jr/Sample-Spreadsheet-100-rows.csv

This is a sample CSV file

Example
Request
cURL
 
curl --location \'http://postman-echo.com/post\' \\
--form \'csvFile=@"g-LOr54jr/Sample-Spreadsheet-100-rows.csv"\'
200 OK
Response
json
 

    "args": ,
    "data": ,
    "files": 
        "Sample-Spreadsheet-100-rows.csv": "data:application/octet-stream;base64,MSwiRWxkb24gQmFzZSBmb3Igc3RhY2thYmxlIHN0b3JhZ2Ugc2hlbGYsIHBsYXRpbnVtIixNdWhhbW1lZCBNYWNJbnR5cmUsMywtMjEzLjI1LDM4Ljk0LDM1LE51bmF2dXQsU3RvcmFnZSAmIE9yZ2FuaXphdGlvbiwwLjgNCjIsIjEuNyBDdWJpYyBGb290IENvbXBhY3QgIiJDdWJlIiIgT2ZmaWNlIFJlZnJpZ2VyYXRvcnMiLEJhcnJ5IEZyZW5jaCwyOTMsNDU3LjgxLDIwOC4xNiw2OC4wMixOdW5hdnV0LEFwcGxpYW5jZXMsMC41OA0KMywiQ2FyZGluYWwgU2xhbnQtRK4gUmluZyBC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NzksMS43NiwwLjcsTm9ydGh3ZXN0IFRlcnJpdG9yaWVzLFBlbnMgJiBBcnQgU3VwcGxpZXMsMC41Ng0KOTgsUHJpc21hY29sb3IgQ29sb3IgUGVuY2lsIFNldCxKYW1pZSBLdW5pdHosMTA3ODksNzYuNDIsMTkuODQsNC4xLE5vcnRod2VzdCBUZXJyaXRvcmllcyxQZW5zICYgQXJ0IFN1cHBsaWVzLDAuNDQNCjk5LFhlcm94IEJsYW5rIENvbXB1dGVyIFBhcGVyLEFudGhvbnkgSm9obnNvbiwxMDc5MSw5My4zNiwxOS45OCw1Ljc3LE5vcnRod2VzdCBUZXJyaXRvcmllcyxQYXBlciwwLjM4DQoxMDAsNjAwIFNlcmllcyBGbGlwLFJhbHBoIEtuaWdodCwxMDk0NSw0LjIyLDk1Ljk5LDguOTksTm9ydGh3ZXN0IFRlcnJpdG9yaWVzLFRlbGVwaG9uZXMgYW5kIENvbW11bmljYXRpb24sMC41Nw0K"
    ,
    "form": ,
    "headers": 
        "x-forwarded-proto": "http",
        "x-forwarded-port": "80",
        "host": "postman-echo.com",
        "x-amzn-trace-id": "Root=1-61f83f15-081343994355a9734afe6aff",
        "content-length": "11204",

==============================================

https://stackoverflow.com/questions/43199786/add-csv-file-to-http-post


Asked 6 years, 1 month ago
Modified 3 months ago
Viewed 53k times
30

I want to send a postman HTTP POST. In this request, for key \'fisier\', I like to attach a csv file. How this can be done?

https://i.stack.imgur.com/Pnkii.png

1 Answer

57
 

This can be done using

  1. Select the POST method and type the url

  2. In the Body menu header, click on form-data check-box

  3. In the key-value form that comes,

    3.1 add the key as fisier

    3.2 Choose the type as File from the dropdown near the key

    3.3 A file chooser button opens, click it, borwse the file and upload it

    3.4 Click on Send method to send the request



 

安装 ANSYS19.0 最后一步 Add a License File 出现 Did not upload file - Error

出现错误
Did not upload file - Error: The hostid in the license file is not a valid hostid for this license server machine.
原因:生成 license.txt 时 host ID 填写的不对

在 License Management Center 中的 Get system Hostid Information 中查看可用的 Hostname 和 Host id (Mac address)两个都可以试试,看看那个好使,一般最后一个好使

然后以管理员的身份运行 A190_Cale 文件

这里一定要选 n 才能生成 license.txt 文件,然后填入 hostname 和 hostid

最后验证结果成功
用到的A190_Cale文件

链接: https://pan.baidu.com/s/1hUvzp-3qDPLiAy8EMVOk9A
提取码: ixbp

以上是关于postman: Upload a file via POST request的主要内容,如果未能解决你的问题,请参考以下文章

File upload error - unable to create a temporary file

python upload file

angularJs中上传图片/文件功能:ng-file-upload

Warning: File upload error - unable to create a temporary file in Unknown on line 0

Warning: File upload error - unable to create a temporary file in Unknown on line 0 的解决办法

[Selenium+Java] How to Upload & Download a File using Selenium Webdriver