question

Jesse D Schoch avatar image
Jesse D Schoch asked

upload SerializationException

I'm attempting to upload via multipart. I have curl working, but my elixir library does not seem to be providing the correct format. request ID: "x-amzn-RequestId" => "4b97e9c9-d8b3-11e4-8d36-5d5d5db4b857" Below is a capture from netcat of a file that contains the text "this is some test text to upload to cloud drive\n", hard to tell what is not correct from the error provided. POST / HTTP/1.1 Authorization: Bearer Atza|REDACTED Content-Type: multipart/form-data; boundary=---------------------------mtynipxrmpegseog User-Agent: hackney/1.0.6 Host: localhost:9010 Content-Length: 504 -----------------------------mtynipxrmpegseog content-length: 68 content-type: application/octet-stream content-disposition: form-data; name="metadata" {"name":filename,"kind":"FILE","parents":["REDACTED"]} -----------------------------mtynipxrmpegseog content-length: 48 content-disposition: form-data; name=file; filename=" test.txt" filename: test.txt content-type: image/jpeg this is some test text to upload to cloud drive -----------------------------mtynipxrmpegseog--
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.

Jesse D Schoch avatar image
Jesse D Schoch answered
I've made progress to get this to look more like the example, but it still has a serialization error. Do I need to set the content type for metadata? POST /foo HTTP/1.1 Authorization: Bearer Atza|REDACTED Content-Type: multipart/form-data; boundary=---------------------------mtynipxrmpegseog User-Agent: hackney/1.0.6 Host: localhost:9010 Content-Length: 448 -----------------------------mtynipxrmpegseog content-length: 48 content-disposition: form-data; name=content; filename= test.txt content-type: image/jpeg this is some test text to upload to cloud drive -----------------------------mtynipxrmpegseog content-length: 31 content-type: application/octet-stream content-disposition: form-data; name="metadata" {"name": test.txt,"kind":"FILE"} -----------------------------mtynipxrmpegseog--
10 |5000

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

Jesse D Schoch avatar image
Jesse D Schoch answered
turns out i was using the metadataURL not the contentUrl it would be nice if there was a way to put an error for the wrong url based on the params used, not sure this i spossible
10 |5000

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