uploadRawFile function

Future<CubeFile> uploadRawFile(
  1. List<int> bytes,
  2. String name, {
  3. bool? isPublic,
  4. String? mimeType,
  5. dynamic onProgress(
    1. int progress
    )?,
})

Uploads the raw file data to the Connectycube storage. The same as uploadFile but receives raw data of file in bytes. It is helpful for the Web platform where we don't have access to the storage.

bytes - the raw data of the file name - the file's name

Implementation

Future<CubeFile> uploadRawFile(List<int> bytes, String name,
    {bool? isPublic, String? mimeType, Function(int progress)? onProgress}) {
  return UploadFileQuery.fromBytes(bytes, name,
          isPublic: isPublic, mimeType: mimeType, onProgress: onProgress)
      .perform();
}