I try to upload a image (XFile made with andoid cam) with Dio to my REST Service in C# with .net Core 6. What's the best practice without storing the image on the device?
I become an HTTP 415....
Flutter:
Uint8List imageBytes = await image.readAsBytes();
var response = await _client!.request('some URL',
data: {"file": imageBytes},options: Options(method: 'POST', contentType: "image/jpeg"))
REST:
[HttpPost("uploadimage")]
public async Task<ActionResult> UploadImage(IFormFile file)
{
// something special
}