UploadRequest class

Everything an UploadAdapter needs to open a server-side session.

Instances are created by the orchestrator after the file has been validated and (optionally) compressed, so file and fileSize always describe the bytes that are actually going to be sent.

Annotations
  • @immutable

Constructors

UploadRequest({required String uploadId, required File file, required String fileName, required int fileSize, required String contentType, required int chunkSize, required int totalChunks, String? checksum, Map<String, String> metadata = const <String, String>{}, UploadOptions options = const UploadOptions()})
Creates an upload request.
const

Properties

checksum → String?
Whole-file digest, when ChecksumMode.includesFile was requested.
final
chunkSize → int
Size of each chunk except possibly the last.
final
contentType → String
MIME type, e.g. image/jpeg. Falls back to application/octet-stream.
final
file → File
The file that will be read. May be a compressed temporary copy.
final
fileName → String
Name to report to the server.
final
fileSize → int
Size of file in bytes.
final
hashCode → int
The hash code for this object.
no setterinherited
isChunked → bool
Whether the transfer will be split across more than one chunk.
no setter
metadata → Map<String, String>
Caller-supplied metadata, forwarded verbatim.
final
options → UploadOptions
The options this upload was started with.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
totalChunks → int
Number of chunks the file was split into. At least 1.
final
uploadId → String
Client-generated identifier, stable across resumes.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited