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.
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.
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.