Content type is being overwritten by Supabase
Hi Guys, I am storing a file using Supabase SDK in .NET in I see that regardless of content-type I set explicitly, in Supabase my file has "octet/stream" content type.
Here is the code:
public async Task Save(
Guid assetId,
byte[] content,
string contentType,
CancellationToken ct = default)
{
var fileName = assetId.ToString();
await _client.Storage
.From(BucketName)
.Upload(
content,
fileName,
new Supabase.Storage.FileOptions
{
ContentType = contentType,
Upsert = true
});
}
Here is the code:
public async Task Save(
Guid assetId,
byte[] content,
string contentType,
CancellationToken ct = default)
{
var fileName = assetId.ToString();
await _client.Storage
.From(BucketName)
.Upload(
content,
fileName,
new Supabase.Storage.FileOptions
{
ContentType = contentType,
Upsert = true
});
}