Page updated Jan 16, 2024

List files

Amplify Flutter v0 is now in Maintenance Mode until July 19th, 2024. This means that we will continue to include updates to ensure compatibility with backend services and security. No new features will be introduced in v0.

Please use the latest version (v1) of Amplify Flutter to get started.

If you are currently using v0, follow these instructions to upgrade to v1.

You can list all files uploaded under a given path.

This will list all public files (i.e. those with guest access level):

Future<void> listItems() async { try { final result = await Amplify.Storage.list(); final items = result.items; safePrint('Got items: $items'); } on StorageException catch (e) { safePrint('Error listing items: $e'); } }
1Future<void> listItems() async {
2 try {
3 final result = await Amplify.Storage.list();
4 final items = result.items;
5 safePrint('Got items: $items');
6 } on StorageException catch (e) {
7 safePrint('Error listing items: $e');
8 }
9}