I use MultipartFile.fromBytes instead of MultipartFile.fromFile
For example :
from this :
final file = await MultipartFile.fromFile(filePath);
to this :
final file = MultipartFile.fromBytes(File(filePath).readAsBytesSync(), filename: filePath.split("/").last);
网友评论