2020IP / TwentyTwenty.Storage

A cross-cloud storage abstraction
Other
100 stars 26 forks source link

AmazonS3Exception: The request signature we calculated does not match the signature you provided #10

Closed jarroda closed 6 years ago

jarroda commented 7 years ago
               var prop = new BlobProperties
                {
                    ContentType = mimeType,
                    Metadata = new Dictionary<string, string>
                    {
                        { "FileName", "黑猫.jpeg" },
                    },
                };

                _logger.LogInformation("Updating blob properties...");
                await _storage.UpdateBlobPropertiesAsync(blob.Container, blob.Name, prop);

Results in: Exception updating blob properties. TwentyTwenty.Storage.StorageException: Invalid access permissions. ---> Amazon.S3.AmazonS3Exception: The request signature we calculated does not match the signature you provided. Check your key and signing method. ---> Amazon.Runtime.Internal.HttpErrorResponseException: Exception of type 'Amazon.Runtime.Internal.HttpErrorResponseException' was thrown.

jarroda commented 6 years ago

Amazon S3 apparently only supports ASCII characters in metadata via their REST API, which is what the C# S3 client utilizes. Closing this issue for now since there is no practical way to fix this.