I am trying to upload an image using resigned URL .But I got
Invalid argument(s): Invalid request body "[object File]".
I tried with text also.
I think issue is due to content type.But I don't know what content type is give for "Object File".
Future<void> uploadfile(String url, File image, String type) async {
var urls = Uri.parse(url);
try {
try{
var response = await http.put(
urls,
body:image,
headers: {
"Content-Type":"image/$type",
},
);
print("respons is ${response.statusCode}");
}catch(e){
print("catch error is $e");
}
} catch (e) {
throw ('Error uploading photo');
}
}