FileResponse constructor
FileResponse(
- File file, {
- ContentDisposition disposition = ContentDisposition.inline,
- String? contentType,
Implementation
FileResponse(
this.file, {
ContentDisposition disposition = ContentDisposition.inline,
String? contentType,
}) : super(
file.openRead(),
file.lengthSync(),
fileName: p.basename(file.path),
disposition: disposition,
contentType:
Mime.fromExtension(p.extension(file.path)) ?? Mime.octetStream,
);