-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Description
If you call Create and then immediately Close the file without writing anything (e.g., for an empty file), the upload fails and no file is created. This is because the Close method sends a CompleteMultipartUpload tag with no children:
POST /xxx/asdf.txt?uploadId=xxx HTTP/1.1
Host: xxx
User-Agent: Go 1.1 package http
Content-Length: 51
Authorization: AWS xxx
Date: Wed, 07 Jan 2015 16:57:26 GMT
Accept-Encoding: gzip
<CompleteMultipartUpload></CompleteMultipartUpload>
HTTP/1.1 400 Bad Request
Connection: close
Transfer-Encoding: chunked
Content-Type: application/xml
Date: Wed, 07 Jan 2015 16:57:26 GMT
Server: AmazonS3
X-Amz-Id-2: xxx
X-Amz-Request-Id: xxx
118
<Error><Code>MalformedXML</Code><Message>The XML you provided was not well-formed or did not validate against our published schema</Message><RequestId>xxx</RequestId><HostId>xxx</HostId></Error>
The AWS API docs at http://docs.aws.amazon.com/AmazonS3/latest/API/mpUploadComplete.html say that the CompleteMultipartUpload element requires one or more Parts.
Metadata
Metadata
Assignees
Labels
No labels