minio/minio-dotnet

`Content-Disposition` not supported in `PutObjectAsync`

Juulsgaard opened this issue · 0 comments

Problem

Content-Disposition can't be assigned when calling PutObjectAsync via the SDK

Description

I am trying to achieve a setup using MinIO where all files are public for a simple storage solution on an isolated network.

It's working fine, but I have run into an issue when trying to assign a Content-Disposition to the objects when uploading.
I need Content-Disposition to be set on the object, since I won't be signing any URLs and thus won't be able to assign it there.

According to the S3 docs we should be able to just set the Content-Disposition in the PutObject request, but the .NET SDK is not allowing this.
From what I can see the issue here is that Content-Disposition isn't a valid request header, and it also isn't on the whitelist of additionally supported headers (see HttpRequestMessageBuilder.Request getter).
The error message is "Unsupported signed header: (content-disposition: " and is thrown in the HttpRequestMessageBuilder.Request getter.

Would it be possible to whitelist Content-Disposition so we can assign that header on object creation?