FileUploader class
The file uploader uploads files to Serverpod's cloud storage. On the server
you can setup a custom storage service, such as S3 or Google Cloud. To
directly upload a file, you first need to retrieve an upload description
from your server. After the file is uploaded, make sure to notify the server
by calling verifyUpload on the current Session object.
Constructors
- FileUploader(String uploadDescription)
-
Creates a new FileUploader from an
uploadDescriptioncreated by the server.
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
-
upload(
Stream< List< stream, [int? length]) → Future<int> >bool> -
Uploads a file from a Stream, returns true if successful. The
lengthof the stream is optional, but if it's not provided for a multipart upload, the entire file will be buffered in memory. -
uploadByteData(
ByteData byteData) → Future< bool> - Uploads a file contained by a ByteData object, returns true if successful.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited