putFile_Request method
StreamedRequest
putFile_Request(})
Request to put a new file at path
with file
as content.
See:
- putFile for a complete operation executing this request.
Implementation
http.StreamedRequest putFile_Request(
File file,
FileStat fileStat,
PathUri path, {
DateTime? lastModified,
DateTime? created,
void Function(double progress)? onProgress,
}) {
// Authentication and content-type headers are already set by the putStream_Request.
// No need to set them here.
return putStream_Request(
file.openRead(),
path,
lastModified: lastModified,
created: created,
contentLength: fileStat.size,
onProgress: onProgress,
);
}