Replies: 1 comment
-
I found further documentation that suggests the following for setting similar parameters:
If I replace the Cache-Control and ACL variable settings with |
Beta Was this translation helpful? Give feedback.
-
I found further documentation that suggests the following for setting similar parameters:
If I replace the Cache-Control and ACL variable settings with |
Beta Was this translation helpful? Give feedback.
-
Per the documentation for Transfer I'm trying to set up my options array to set the storage class to something other than the default. My code looks like this:
$options=array( 'before' => function(Aws\CommandInterface $command) { $command['StorageClass'] = 'REDUCED_REDUNDANCY'; } );
There aren't any errors being thrown when I initiate the transfer, and the folder with its contents is making it up to the bucket, but the desired storage class isn't being set on the objects, so I'm guessing I'm missing something. I think it's related to the following statement in the documentation for the options array:
"before: (callable) A callback to invoke before each transfer. The callback accepts a single argument: Aws\CommandInterface $command. The provided command will be either a GetObject, PutObject, InitiateMultipartUpload, or UploadPart command."
Since the provided command could be PutObject or UploadPart and those have different callbacks I think I need to include the different callbacks somewhere in my
$options
but have no clue how to format that. Anyone able to give me a code example that should work? Also if I'm way off base please point me in the right direction.I should note that I've got code for the ObjectUploader to successfully set the storage class, which is more or less where the code above was derived from, but this one has me stumped!
Beta Was this translation helpful? Give feedback.
All reactions