update static method

Future<String> update(
  1. String oldFileUrl,
  2. UploadedFile newFile, {
  3. String? subdirectory,
})

Replaces an old file with a new one.

Deletes the old file and uploads the new one.

Implementation

static Future<String> update(
  String oldFileUrl,
  UploadedFile newFile, {
  String? subdirectory,
}) async {
  await delete(oldFileUrl);
  return await create(newFile, subdirectory: subdirectory);
}