Gaufrette icon indicating copy to clipboard operation
Gaufrette copied to clipboard

Reduced Redundancy Storage

Open CMCDragonkai opened this issue 11 years ago • 1 comments

Using AwsS3, is it possible to write the objects to reduced redundancy storage?

Here's the docs: http://docs.aws.amazon.com/AmazonS3/latest/dev/SetStoClsOfObjUploaded.html

There's also the issue of the 405 when the file may no longer exist because it's reduced redundancy. Does Gaufrette throw an exception?

CMCDragonkai avatar Jan 10 '14 04:01 CMCDragonkai

Figured it out, it just needs meta data using the File object.

However can there be a new tagged release? The last one was 3 months old.

Solution looks like this:

        //setup the file object
        $snapshot_file = new File($snapshot_name, $this->filesystem);

        //write the snapshot data, and potentially overwrite it
        $s3_query = $snapshot_file->setContent($snapshot_data, [
            'ContentType'   => 'application/x-bzip2',
            'StorageClass'  => 'REDUCED_REDUNDANCY'
        ]);

CMCDragonkai avatar Jan 12 '14 16:01 CMCDragonkai