我一直在努力让上传文件发布工作。我得到的只是一个没有帮助的 404 not found 错误。我正在使用 C# HttpWebRequest。当我在提琴手中捕获请求时,这就是它的样子。
--
POST https://api.box.com/2.0/files/content HTTP/1.1
Authorization: BoxAuth api_key=APK_KEY&auth_token=AUTH_TOKEN
Content-Type: multipart/form-data; boundary=----------------------------8cfa73fa0212bf1
Host: api.box.com
Content-Length: 198082
------------------------------8cfa73fa0212bf1
------------------------------8cfa73fa0212bf1
Content-Disposition: form-data; name="folder_id";
532901558
------------------------------8cfa73fa0212bf1
------------------------------8cfa73fa0212bf1
Content-Disposition: form-data; name="filename"; filename="Pasha.pdf"
Content-Type: application/pdf
%PDF-1.5
%����
1 0 obj
<</Type/Catalog/Pages 2 0 R/Lang(en-CA) /StructTreeRoot 29 0 R/MarkInfo<</Marked true>>>>
endobj
2 0 obj
// rest of file data goes here ... too long to post
------------------------------8cfa73fa0212bf1