Hello,
I’m getting the following error when uploading files above 5MB to Cloudflare R2:
25/08/2023 09:20:57 [Error] Destination error: Failed to upload "C:\Windows\TEMP\SYSTEM\Pranas.NET\SBF\0e82be2e-fd86-4d17-85f4-db2480620255\<databasename>202308250914.7z" file to "mysql" folder. > One or more errors occurred. > STREAMING-AWS4-HMAC-SHA256-PAYLOAD not implemented
On C# this is solved by setting to true the flag DisablePayloadSigning
, but I can’t find a way of doing that on the GUI.
Here are 2 examples that work for me:
Custom C# code I made (using the .NET AWSSDK.S3 NuGet package):
var fileTransferUtility = new TransferUtility(s3client);
var uploadRequest = new TransferUtilityUploadRequest
{
Key = fileKey,
FilePath = $"{filePath}",
BucketName = settings.CloudflareR2BucketName,
DisablePayloadSigning = true,
ContentType = "application/octet-stream",
DisableMD5Stream = true,
Metadata =
{
["sha256"] = sha256
}
};
await fileTransferUtility.UploadAsync(uploadRequest);
GitLab Self-Hosted object storage configuration:
gitlab_rails['object_store']['connection'] = {
'provider' => 'AWS',
'region' => 'auto',
'aws_access_key_id' => 'xxx',
'aws_secret_access_key' => 'xxx',
'aws_signature_version' => 4,
'enable_signature_v4_streaming' => false,
'endpoint' => 'https://xxx.r2.cloudflarestorage.com',
'path_style' => true
}
Please advise.
Thank you