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

Get file properties

You can get file properties and metadata without downloading the file using Amplify.Storage.getProperties.

Future<void> getFileProperties() async {
try {
final result = await Amplify.Storage.getProperties(
path: const StoragePath.fromString('example.txt'),
).result;
safePrint('File size: ${result.storageItem.size}');
} on StorageException catch (e) {
safePrint(e.message);
}
}