Storage class

Handles file storage operations for uploaded files in Flint Dart.

Default behavior:

  • Files are stored in public/uploads
  • Public URL is /uploads/<generated-filename>

If user passes a subdirectory, files go to:

  • public/<subdirectory>
  • URL /subdirectory/<generated-filename>

Constructors

Storage()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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

Operators

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

Static Methods

create(UploadedFile file, {String? subdirectory}) Future<String>
Saves an uploaded file to the server.
delete(String fileUrl) Future<void>
Deletes file using its public URL.
update(String oldFileUrl, UploadedFile newFile, {String? subdirectory}) Future<String>
Replaces an old file with a new one.