Skip to content

Commit

Permalink
Fixed errors to make it work, finally!
Browse files Browse the repository at this point in the history
  • Loading branch information
mludvig committed Jan 2, 2012
1 parent 880e0de commit 7b09ee8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions S3/MultiPart.py
Expand Up @@ -109,7 +109,7 @@ def upload_part(self, data, id):
# TODO implement Content-MD5
content_length = str(len(data))
debug("Uploading part %i of %r (%s bytes)" % (id, self.upload_id, content_length))
headers = { "Content-Length": content_length }
headers = { "content-length": content_length }
query_string = "?partNumber=%i&uploadId=%s" % (id, self.upload_id)
request = self.s3.create_request("OBJECT_PUT", uri = self.uri, headers = headers, extra = query_string)
response = self.s3.send_request(request, body = data)
Expand All @@ -127,7 +127,7 @@ def complete_multipart_upload(self):
parts_xml.append(part_xml % (id, etag))
body = "<CompleteMultipartUpload>%s</CompleteMultipartUpload>" % ("".join(parts_xml))

headers = { "Content-Length": len(body) }
headers = { "content-length": len(body) }
request = self.s3.create_request("OBJECT_POST", uri = self.uri, headers = headers, extra = "?uploadId=%s" % (self.upload_id))
response = self.s3.send_request(request, body = body)

Expand Down
2 changes: 1 addition & 1 deletion S3/S3.py
Expand Up @@ -753,7 +753,7 @@ def send_file_multipart(self, file, headers, uri, size):

file.seek(0)
upload.upload_all_parts(num_threads, chunk_size)
response = upload.complete_multipart_upload(num_threads, chunk_size)
response = upload.complete_multipart_upload()
response["speed"] = 0 # XXX
return response

Expand Down

0 comments on commit 7b09ee8

Please sign in to comment.