setcors on file puts file
StefanBrand opened this issue · comments
Stefan Brand commented
I mistakenly used setcors
on a file. It seems to silently overwrite the file.
Steps to reproduce
$ echo '<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
<AllowedOrigin>*</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
<AllowedMethod>POST</AllowedMethod>
<AllowedMethod>DELETE</AllowedMethod>
<AllowedMethod>PUT</AllowedMethod>
<AllowedHeader>*</AllowedHeader>
</CORSRule>
</CORSConfiguration>
' > cors_config.xml
$ s3cmd setcors cors_config.xml s3://test-bucket/test.txt
$ s3cmd get s3://stefans-bucket/test.txt -
download: 's3://stefans-bucket/test.txt' -> '-' [1 of 1]
378 of 378 100% in 0s 1381.92 B/s<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
<AllowedOrigin>*</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
<AllowedMethod>POST</AllowedMethod>
<AllowedMethod>DELETE</AllowedMethod>
<AllowedMethod>PUT</AllowedMethod>
<AllowedHeader>*</AllowedHeader>
</CORSRule>
</CORSConfiguration>
378 of 378 100% in 0s 1378.01 B/s done