mercredi 31 décembre 2014

How can I set the Cache-Control when using Write-S3Object

I am using Windows Powershell for AWS and I have tried the following:


Write-S3Object -BucketName 'user-ab-staging' -KeyPrefix 'content/css' -Folder 'content/css' -SearchPattern '*.css' -Metadata @{"Cache-Control" = "Value"} -CannedACLName PublicRead


It gives me a very strange error and only tries to load one css file:



Uploaded 1 object(s) to bucket 'user-ab-staging' from 'C:\g\ab-user\WebUserApp\content\css' with keyprefix
'content/css'
Write-S3Object :
At line:1 char:1
+ Write-S3Object `
+ ~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (Amazon.PowerShe...eS3ObjectCmdlet:WriteS3ObjectCmdlet) [Write-S3Objec
t], InvalidOperationException
+ FullyQualifiedErrorId : Amazon.S3.AmazonS3Exception,Amazon.PowerShell.Cmdlets.S3.WriteS3ObjectCmdlet


Can anyone help tell me what is wrong with this and how I can set the Cache data for the object when I am using Write-S3Object and the Powershell extension for ASW.


Thank you





Aucun commentaire:

Enregistrer un commentaire