FileUploader class
The file uploader uploads files to Serverpods 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 the verifyDirectFileUpload on the current Session object.
Constructors
- FileUploader(String uploadDescription)
-
Creates a new FileUploader from an
uploadDescription
created 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.
-
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