crowdmob/goamz — pull request #296 by AndreyKostov (2014-12-13 04:25:40+00:00)
Title: Add preliminary implementation of PutPartCopy in multi.go

Hey, this is just the alpha version. There are a few things we need to change, but I don't know how to proceed from a goamz design point of view.

The main thing is that the Part I return from putPartCopy currently always has -1 as its size. The reason is that there is no clean way to get the size of the source (because it might be in a different bucket). One solution is to initialize a bucket object for that other bucket and call a Head on the source to get its content length, but that seems really messy. Alternatively, we can leave it to the person doing the putPartCopy to figure out the size, since they have to anyway (because if it is <5 mb their multipart upload will break anyway and they shouldn't be doing a putPartCopy with that source as is).

The current version is functional, since the s3 Complete api call does not require the size of the part, only the etag and part number.

I will also add a test for this new call, but let's figure out what a clean solution to the above problem is first.