toFormData method
将本地文件路径转换为FormData类型 方便直接用于HTTP请求中
Implementation
Future<FormData> toFormData() async {
var file = await toMultipartFile();
return FormData.fromMap({
"file": file,
});
}
将本地文件路径转换为FormData类型 方便直接用于HTTP请求中
Future<FormData> toFormData() async {
var file = await toMultipartFile();
return FormData.fromMap({
"file": file,
});
}