uploadFiles method

Future<List<FileUploadResult>> uploadFiles(
  1. List<FileMetadata> files,
  2. IFileUploadRequest? params
)

Uploads files to the bucket. @param {FileMetadata[]} files - The files to be uploaded @param {IFileUploadRequest} params - Optional parameters to be used for uploading files

Implementation

Future<List<FileUploadResult>> uploadFiles(
    List<FileMetadata> files, IFileUploadRequest? params) async {
  var res = await file_utils.uploadFiles(null, apiPrefix!, params, files);

  if (params?.awaitCid == false) {
    return res.files;
  }
  return await resolveFileCIDs(res.sessionUuid, res.files.length);
}