You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Goal: I want to change the Cache-Control key to some value from its existing, eg max-age=xyz, without touching anything else, and esp without having Content-Type getting screwed.
Something so simple cannot be performed on the aws console, this used to be allowed earlier, but now one needs to go thru some convoluted copy step (https://docs.aws.amazon.com/AmazonS3/latest/userguide/add-object-metadata.html). Anyway - the net result of that is that the Content-Type turns to binary/octet-stream from image/jpeg or whatever after copy.
Fine, I thought this was an issue only on the console, and turned to the CLI. (The AWS userguide links to v1 of the CLI docs, while the current version is v2 - which leads to still more headache)
The earlier --metadata-directive REPLACE has been removed and there is a new --copy-props. However its quite unclear how to use this to change a single metadata while leaving everything else the same. I cannot imagine that this is some complex usecase - why is this simple thing not supported? If it is supported - where is the helpful documentation around it?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Goal: I want to change the
Cache-Control
key to some value from its existing, egmax-age=xyz
, without touching anything else, and esp without having Content-Type getting screwed.Something so simple cannot be performed on the aws console, this used to be allowed earlier, but now one needs to go thru some convoluted copy step (https://docs.aws.amazon.com/AmazonS3/latest/userguide/add-object-metadata.html). Anyway - the net result of that is that the
Content-Type
turns tobinary/octet-stream
fromimage/jpeg
or whatever after copy.Fine, I thought this was an issue only on the console, and turned to the CLI. (The AWS userguide links to v1 of the CLI docs, while the current version is v2 - which leads to still more headache)
The v2 CLI is equally unhelpful - there is no adequate documentation as given here https://awscli.amazonaws.com/v2/documentation/api/latest/reference/s3/cp.html
The earlier
--metadata-directive REPLACE
has been removed and there is a new--copy-props
. However its quite unclear how to use this to change a single metadata while leaving everything else the same. I cannot imagine that this is some complex usecase - why is this simple thing not supported? If it is supported - where is the helpful documentation around it?Beta Was this translation helpful? Give feedback.
All reactions