question

aardbeitje avatar image
aardbeitje asked

Internal server error (500) when posting a file

Hi, I am trying to upload a file but keep running into an internal server error. For debugging purposes I use curl to create the request (I abbreviated the access token): curl -v -X POST -F "kind=FILE" -F "name=a.gif" -F content=a.gif " https://content-na.drive.amazonaws.com/cdproxy/nodes" --header "Authorization: Bearer Atza|IQEBxxxx" * About to connect() to content-na.drive.amazonaws.com port 443 (#0) * Trying 54.210.192.218... connected * Connected to content-na.drive.amazonaws.com (54.210.192.218) port 443 (#0) * SSLv3, TLS handshake, Client hello (1): * SSLv3, TLS handshake, Server hello (2): * SSLv3, TLS handshake, CERT (11): * SSLv3, TLS handshake, Server key exchange (12): * SSLv3, TLS handshake, Server finished (14): * SSLv3, TLS handshake, Client key exchange (16): * SSLv3, TLS change cipher, Client hello (1): * SSLv3, TLS handshake, Finished (20): * SSLv3, TLS change cipher, Client hello (1): * SSLv3, TLS handshake, Finished (20): * SSL connection using DHE-RSA-AES128-SHA * Server certificate: * subject: C=US; ST=Washington; L=Seattle; O= Amazon.com, Inc.; CN= content-na.drive.amazonaws.com * start date: 2015-03-20 00:00:00 GMT * expire date: 2015-10-20 23:59:59 GMT * subjectAltName: content-na.drive.amazonaws.com matched * issuer: C=US; O=VeriSign, Inc.; OU=VeriSign Trust Network; OU=Terms of use at https://www.verisign.com/rpa (c)10; CN=VeriSign Class 3 Secure Server CA - G3 * SSL certificate verify ok. > POST /cdproxy/nodes HTTP/1.1 > User-Agent: curl/7.19.7 (universal-apple-darwin10.0) libcurl/7.19.7 OpenSSL/0.9.8y zlib/1.2.3 > Host: content-na.drive.amazonaws.com > Accept: */* > Authorization: Bearer Atza|IQEBxxx > Content-Length: 444 > Expect: 100-continue > Content-Type: multipart/form-data; boundary=----------------------------5606a8591cdf > < HTTP/1.1 100 Continue < HTTP/1.1 500 Internal Server Error < Content-Type: application/vnd.error+json < Date: Sat, 11 Apr 2015 17:37:06 GMT < Server: Amazon-Cloud-Drive < x-amzn-RequestId: c72c6ac8-d176-4361-a8ad-7f7b0d1e9c66 < Content-Length: 30 < Connection: keep-alive < * Connection #0 to host content-na.drive.amazonaws.com left intact * Closing connection #0 * SSLv3, TLS alert, Client hello (1): I tried to stick as close to the example in the docs as possible and played around with some options but no success yet... Any clue to what I am doing wrong? Kind regards, Arjan Lamers
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.

1 Answer

aardbeitje avatar image
aardbeitje answered
Nevermind, silly mistake: I had to use a single form parameter for the metadata: -F 'metadata={"kind"="FILE","name"="a.gif"}'
10 |5000

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