Replaces an existing file at the specified path with a new one.
buckets permissions: noneobjects permissions: update and selectThe relative file path. Should be of the format folder/subfolder/filename.png. The bucket must already exist before attempting to update.
File object to be stored in the bucket.
undefined
Sets the retryAttempts parameter set across the storage client. Defaults to 10.
Pass a RetryController instance and call `cancel()` to cancel the retry attempts.
final avatarFile = File('path/to/local/file');
final String path = await supabase.storage.from('avatars').update(
'public/avatar1.png',
avatarFile,
fileOptions: const FileOptions(cacheControl: '3600', upsert: false),
);
final Uint8List avatarFile = file.bytes;
final String path = await supabase.storage.from('avatars').updateBinary(
'public/avatar1.png',
avatarFile,
fileOptions: const FileOptions(cacheControl: '3600', upsert: false),
);