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

Page updated May 21, 2024

Get file properties

Amplify Flutter v1 is deprecated as of April 30th, 2025. No new features or bug fixes will be added. Dependencies may become outdated and potentially introduce compatibility issues.

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

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

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

import 'package:amplify_flutter/amplify_flutter.dart';
Future<void> getFileProperties() async {
try {
final result = await Amplify.Storage.getProperties(
key: 'example.txt',
).result;
safePrint('File size: ${result.storageItem.size}');
} on StorageException catch (e) {
safePrint('Could not retrieve properties: ${e.message}');
rethrow;
}
}