You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var metaData = new Dictionary<string, string>
(StringComparer.Ordinal)
{
{ "product-id", productId.ToString() }
};
var putObjectArgs = new PutObjectArgs()
.WithBucket("test-bucket")
.WithObject(objectName)
.WithObjectSize(inputStream.Length)
.WithStreamData(inputStream)
.WithHeaders(metaData)
.WithContentType("image/png");
await _minioClient.PutObjectAsync(putObjectArgs, cancellationToken);
Code for me is absolutely correct, but the effect is that Content-Type of the upload file will always be application/octet-stream, where it's strictly specified to be image/png. This is as such a bug.
But apparently If I change order and make WithContentType go BEFORE WithHeaders then it will work correctly and Content-Type will be assigned as it should.
So it looks like specifying WithContentType after WithHeaders has no effect and the default value will be used.
The text was updated successfully, but these errors were encountered:
Let's consider the following code:
Code for me is absolutely correct, but the effect is that
Content-Type
of the upload file will always beapplication/octet-stream
, where it's strictly specified to beimage/png
. This is as such a bug.But apparently If I change order and make
WithContentType
go BEFOREWithHeaders
then it will work correctly and Content-Type will be assigned as it should.So it looks like specifying WithContentType after WithHeaders has no effect and the default value will be used.
The text was updated successfully, but these errors were encountered: