I tried:
$objS3->putObject(array(
'Bucket' => $sBucket
'Key' => $sBucketFolder . $sFilenameToSave,
'SourceFile' => $sFile,
'ACL' => 'public-read'
'Metadata' => [
'Content-Type' => 'text/css',
'Content-Encoding' => 'gzip',
]
));
But it did not work. Any idea?
Tks.
ContentType and ContentEncoding should not be sent as metadata. Use this instead:
$objS3->putObject(array(
'Bucket' => $sBucket
'Key' => $sBucketFolder . $sFilenameToSave,
'SourceFile' => $sFile,
'ACL' => 'public-read',
'ContentType' => 'text/css',
'ContentEncoding' => 'gzip'
));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With