Actually, copying objects in S3 will automatically copy the object's metadata (x-amz-meta-* headers, Content-Type, etc) as long as you don't set the metadata directive to replace: http://docs.aws.amazon.com/AmazonS3/latest/API/SOAPCopyObject.html

On Aug 9, 2013, at 2:15 AM, Christophe Coevoet <notifications@github.com> wrote:

> In src/Gaufrette/Adapter/AwsS3.php:
> 
> > +    }
> > +
> > +    /**
> > +     * {@inheritDoc}
> > +     */
> > +    public function setMetadata($key, $metadata)
> > +    {
> > +        $this->metadata[$key] = $metadata;
> > +    }
> > +
> > +    /**
> > +     * {@inheritDoc}
> > +     */
> > +    public function getMetadata($key)
> > +    {
> > +        return isset($this->metadata[$key]) ? $this->metadata[$key] : array();
> well, getMetadata($key) should get the metadata for the object stored at $key. currently, the method is useless if the file was already persistent as it returns only the new metadata. This makes the implementation of copying a file broken (as it does not copy the metadata).
> the handling of metadata in the old S3 adapter is known to be broken, but it is not fixed yet
> 
> —
> Reply to this email directly or view it on GitHub.