fromFileSync static method
Implementation
static MultipartFileRecreatable fromFileSync(
String filePath, {
String? filename,
MediaType? contentType,
}) {
filename ??= p.basename(filePath);
final file = File(filePath);
final length = file.lengthSync();
final stream = file.openRead();
return MultipartFileRecreatable(
stream,
length,
filename,
filePath,
contentType: contentType,
);
}