更新时间:2022-05-04 07:52:46
这里的问题是 API 需要一些额外的参数.初始请求需要一些参数来接受原始内容并指定文件名/大小.设置并取回正确的链接提交后,我可以使用:
The problem here was what the API required some additional parameters. Initial request required some parameters to accept raw content and specify filename/size. After setting that and getting back proper link to submit, I was able to use:
Invoke-RestMethod -Uri $uri -Method Post -InFile $filePath -ContentType "multipart/form-data"