saveToStorage method

Future<String> saveToStorage({
  1. String? storageId,
})

将图像保存到特定Storage库中

storageId 存储ID,可选参数 返回一个Future

Implementation

Future<String> saveToStorage({String? storageId}) async {
  await FilePath.setup();
  String uuid = storageId ?? Uuid().v4();
  String destFile = FilePath.imagePath + uuid;
  await saveToFile(destFile);

  return uuid;
}