S3 upload broken
-
Hi, I have been using the static-porter plugin. thankyou its really quite useful.
I thought I would share a bug i had with the signed header for AWS uploads failing.
line 1264 changes the case of the entry ‘Content-Type’ and invalidates the signed header. Commenting this line out seems to fix the issue.$content_type = static_porter_guess_mime($file_path);
$headers = static_porter_aws_sigv4('PUT', $host, $uri, $region, 's3', $body, [
'content-type' => $content_type,
], $access_key, $secret_key);
// $headers['Content-Type'] = $content_type;
$response = wp_remote_request('https://' . $host . $uri, [
'method' => 'PUT',
'headers' => $headers,
'body' => $body,
'timeout' => 60,
]);
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
You must be logged in to reply to this topic.