kaliber-scala / play-s3

S3 module for Play
MIT License
119 stars 49 forks source link

Updating Header Information #57

Closed neilchaudhuri closed 9 years ago

neilchaudhuri commented 9 years ago

Is it possible to update the header information for a key without removing the key and replacing it with the same content but new headers?

Thanks.

EECOLOR commented 9 years ago

Maybe using the x-amz-metadata-directive, see http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectCOPY.html#RESTObjectCOPY-requests-request-parameters.

First google result was: http://stackoverflow.com/questions/269840/is-it-possible-to-change-headers-on-an-s3-object-without-downloading-the-entire

neilchaudhuri commented 9 years ago

Right, I know it is theoretically possible using the S3 API directly. I was just curious if play-s3 offered any kind of abstraction or if you had any suggestion beyond the standard guidance. Besides, that SO post is from 2008. Back then, there had only been one Transformers movie. That's how long ago it was.

Thanks.

EECOLOR commented 9 years ago

Haha, I didn't even notice it was that old.

I haven't tried it myself. But you could check the S3.putCopy method. Otherwise you could grab an S3Client which is essentially just a WSClient and thus gives you all freedom in the world.

EECOLOR commented 9 years ago

If you think we should have an extra abtraction on S3 or Bucket file a pull request or open an issue :-)