上传与邮差档测试(Upload file test with Postman)

2019-09-28 04:20发布

我与邮差在线测试文件上传到SharePoint。 在我的岗位要求我身体形成集数据并添加一个文件PARAM一个名为a.txt中的文本文件。 该文本文件包含文本

one
two
three

当我执行我的文件上传请求,但是当我打开该文件的内容是

----------------------------235004993628819232914336
Content-Disposition: form-data; name="file"; filename="a.txt"
Content-Type: text/plain

one
two
three
----------------------------235004

我曾尝试Content-Type头设置

应用程序/ x-WWW窗体-urlencoded或多部分/格式数据

但没有运气

Answer 1:

请按照下面的步骤 -

1. Go to the body of the API
2. pass the parameter or key
3. When you pass the key you have a option of value of Text/File like below
4.Choose the file from
5. Click on send.
6. Get your response.

希望这有助于好友。



Answer 2:

在我的情况下设置身体类型的二进制解决我的问题与邮差测试



文章来源: Upload file test with Postman