UploadedFile class base
Constructors
- UploadedFile.empty()
-
factory
- UploadedFile.fromBytes({required String filename, required Uint8List bytes, required String contentType})
Properties
-
bytes
→ Future<
Uint8List> -
Get the file content as bytes
no setter
- contentType → String
-
final
- extension → String
-
Get file extension
no setter
- filename → String
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isAudio → bool
-
Check if this is an audio file
no setter
- isImage → bool
-
Check if this is an image file
no setter
- isLengthKnown → bool
-
Check if length is known without calculating it
no setter
- isValid → bool
-
no setter
- isVideo → bool
-
Check if this is a video file
no setter
-
length
→ Future<
int> -
Get the length
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
string
→ Future<
String> -
Get the file content as string
no setter
Methods
-
copyWith(
{String? filename, String? contentType}) → UploadedFile - Copy this file with new filename
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
save(
String path) → Future< File> - Save the file to the specified path
-
saveToPrivateDir(
String subDir, {bool autoName = true}) → Future< File> -
saveToPublicDir(
String subDir, {bool autoName = true}) → Future< File> - Save file to specific public subdirectory
-
streamTo(
StreamSink< List< sink) → Future<int> >void> - Stream the file content to a StreamSink (memory efficient)
-
streamToResponse(
HttpRequest request, {bool handleRange = true}) → Future< void> - Stream this file back to an HTTP response with proper headers
-
streamToS3(
HttpRequest request, {S3Acl acl = .private, bool autoName = true}) → Future< String?> -
toJson(
) → Future< Map< String, dynamic> > - Get file info as JSON
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited