RequestFile class

Represents an uploaded file part from multipart/form-data. Provides lazy access to bytes, size, and easy storage/move.

Constructors

RequestFile.new({required String filename, required String filetype, required MimeMultipart stream})

Properties

bytes Future<Uint8List>
Lazily reads all bytes from the multipart stream.
no setter
clientMimeType String
Original client‐provided MIME type.
no setter
clientOriginalExtension String
Original client‐provided file extension.
no setter
clientOriginalName String
Original client‐provided file name.
no setter
extension String
File extension without the dot (e.g. "png", "jpg", "pdf").
no setter
filename String
final
filetype String
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size Future<int>
Returns the file size in bytes.
no setter
stream → MimeMultipart
final

Methods

move({required String toPath, required String name}) Future<String>
Move the file into a local path on disk. Creates directories as needed.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
store({String path = '', required String name}) Future<String>
Store the file via your Storage layer.
toString() String
A string representation of this object.
inherited

Operators

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