From 9631f8974dcab4a3ec240a28547a990c05f2d1be Mon Sep 17 00:00:00 2001 From: Menno van der Sman Date: Wed, 30 Jan 2013 20:34:50 +0100 Subject: [PATCH] Fix undefined method 'version_id' during multipart upload --- lib/aws/s3/multipart_upload.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/aws/s3/multipart_upload.rb b/lib/aws/s3/multipart_upload.rb index 4c7e446540a..695e04676d5 100644 --- a/lib/aws/s3/multipart_upload.rb +++ b/lib/aws/s3/multipart_upload.rb @@ -242,8 +242,8 @@ def complete(*parts) raise "no parts uploaded" if complete_opts[:parts].empty? resp = client.complete_multipart_upload(complete_opts) - if resp.version_id - ObjectVersion.new(object, resp.version_id) + if resp.data[:version_id] + ObjectVersion.new(object, resp.data[:version_id]) else object end