I have this method that gets image from device storage and send it to api
var media = CrossMedia.Current;
var file = await media.PickPhotoAsync();
// wait until the file is written while (File.ReadAllBytes(file.Path).Length == 0) { System.Threading.Thread.Sleep(1); } var content = new MultipartFormDataContent(); content.Add(new StreamContent(file.GetStream()), "\"file\"", $"\"{file.Path}\""); var httpClient = new HttpClient(); var httpResponseMessage = await httpClient.PostAsync(URL, content);
How to do this using image path without getting image from device storage