Name:
interface
Value:
Amplify has re-imagined the way frontend developers build fullstack applications. Develop and deploy without the hassle.

Page updated May 1, 2024

Copy files

You can copy an existing file to a different location in your S3 bucket. User who initiates a copy operation should have read permission on the copy source file.

Future<void> copy() async {
try {
final result = await Amplify.Storage.copy(
source: const StoragePath.fromString('album/2024/1.jpg'),
destination: const StoragePath.fromString('shared/2024/1.jpg'),
).result;
safePrint('Copied file: ${result.copiedItem.path}');
} on StorageException catch (e) {
safePrint(e);
}
}