Last active
November 24, 2022 14:11
-
-
Save ziadoz/fe24aa7a81fd13e70867d4b39be0b526 to your computer and use it in GitHub Desktop.
AWS S3 Presigned Upload URL with SSE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// The X-Amz-Server-Side-Encryption header must be set in formInputs and options, with the correct case. | |
new PostObjectV4( | |
$client, | |
$bucket, | |
[ | |
'key' => $key, | |
'acl' => 'private', | |
'X-Amz-Server-Side-Encryption' => 'AES256', | |
], | |
[ | |
['acl' => 'private'], | |
['bucket' => $bucket], | |
['key' => $key], | |
['content-length-range', $size, $size], | |
['x-amz-server-side-encryption' => 'AES256'], | |
], | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment