question

Milind Gupta avatar image
Milind Gupta asked

Cannot upload file

Hi, I am trying to upload a file using the rest API. My request looks like this: URL: https://content-na.drive.amazonaws.com/cdproxy/nodes HEADERS: Authorization:Bearer Atxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...... Content-Type:multipart/form-data; boundary=15444946289062118255615234380081481933593753631896972656261788940429688 content-length:414 BODY: --15444946289062118255615234380081481933593753631896972656261788940429688 Content-Disposition: form-data; name="metadata"; {"name":" file1.txt","kind":"FILE"} --15444946289062118255615234380081481933593753631896972656261788940429688 Content-Disposition: form-data; name="content"; This is a text file This is line 2 of text file. --15444946289062118255615234380081481933593753631896972656261788940429688 Please help me figure out what is wrong with this request? Thanks, Milind
amazon drive
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Milind Gupta avatar image
Milind Gupta answered
The response I get from the server is: 400 {"message":"{}"}
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Milind Gupta avatar image
Milind Gupta answered
Thanks to this thread: https://forums.developer.amazon.com/forums/thread.jspa?messageID=21591呗 After following the format specified here exactly it worked.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.