Skip to content

Issues with AWS S3 SDK’s compatibility when uploading files #3

Description

@towerbit

Refer to examples/csharp-aws-sdk/Means.AwsSdkExamples.csproj for uploading.

var key = $"TEST_UPLOAD.txt";
await using var upload = new MemoryStream(Encoding.UTF8.GetBytes("Hello from the official AWS SDK for .NET."));
var putRequest = new PutObjectRequest
{
    BucketName = bucketName,
    Key = key,
    InputStream = upload,
    ContentType = "text/plain"
};
putRequest.Metadata.Add("example", "aws-sdk-dotnet");

var put = await s3Client.PutObjectAsync(putRequest);
Console.WriteLine($"Uploaded {bucketName}/{key}, ETag={put.ETag}");

By opening TEST_UPLOAD.txt through the WebUI or download, the content is:

29;chunk-signature=119647e959407fc595af3ca390407f4eda10a71d15009395d6eac1a445ce1ba8
Hello from the official AWS SDK for .NET.
0;chunk-signature=dc06f087243710e4960118c084d5a8ea2c80476e2cc6b1e3216336c77f5ecce3
x-amz-checksum-crc32:IgkKYA==
x-amz-trailer-signature:0b46b3c7ae91b3f1614830d2b9eb3f8cb1199998010b0bb13ee9915623341f6d

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions