Hello, if I upload an image using the .NET SDK, the mimetype for my png images is set to "application/octet-stream" instead of "image/png".
This is my code
```public async Task<string> CreateFileAsync(string bucketId, string filename, string content, string mimeType)
{
using var stream = new MemoryStream(Encoding.UTF8.GetBytes(content));
var inputFile = InputFile.FromStream(stream, filename.ToLower(), mimeType);
var fileId = ID.Unique();
inputFile.Path=filename.ToLower();
try
{
var fileToWrite = await _storage.CreateFile(bucketId, fileId, inputFile, new List<string>());
return fileToWrite.Id;
}
catch (Exception ex)
{
Console.WriteLine($"Error: {ex.Message}");
}
return "";
}```
I added "inputFile.Path=filename.ToLower();" just in case but no difference. What could be the problem?
selfhosted Appwrite Version: 1.4.13 Appwrite Nuget: 0.7.1
Recommended threads
- Send Email Verification With REST
I am using REST to create a user on the server side after receiving form data from the client. After the account is successfully created i wanted to send the v...
- Use different email hosts for different ...
Hello, I have 2 projects and i want to be able to set up email templates in the projects. Both projects will have different email host configurations. I see ...
- Migrate from cloud to localhost
Hello everyone. I need to migrate my test project from cloud to localhost, however it seems that this is possible only if a self-hosted appwrite instance it's h...