uploadFile function

Future<CubeFile> uploadFile(
  1. File file, {
  2. bool? isPublic,
  3. String? mimeType,
  4. dynamic onProgress(
    1. int progress
    )?,
})

Uploads the File to the Connectycube storage. Recommended file size should not exceed 100mb

file - the file which you want to upload isPublic - will the file with public access or with private, default value false mimeType - the content type of uploaded file, if not specified SDK will try to generate it from the file extension onProgress - the callback which fires when uploading progress changes

Implementation

Future<CubeFile> uploadFile(File file,
    {bool? isPublic, String? mimeType, Function(int progress)? onProgress}) {
  return UploadFileQuery(file,
          isPublic: isPublic, mimeType: mimeType, onProgress: onProgress)
      .perform();
}