Skip to content

Commit 146a691

Browse files
committed
fix: add missing arrow operator in onProgress callback function
1 parent 33ad5b7 commit 146a691

File tree

1 file changed

+2
-2
lines changed
  • src/pages/[platform]/build-a-backend/storage/download-files

1 file changed

+2
-2
lines changed

src/pages/[platform]/build-a-backend/storage/download-files/index.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,7 @@ const { body, eTag } = await downloadData(
707707
{
708708
path: 'album/2024/1.jpg',
709709
options: {
710-
onProgress: (progress) {
710+
onProgress: (progress) => {
711711
console.log(`Download progress: ${(progress.transferredBytes/progress.totalBytes) * 100}%`);
712712
}
713713
}
@@ -956,7 +956,7 @@ download
956956
```dart
957957
final operation = Amplify.Storage.downloadData(
958958
path: const StoragePath.fromString('public/example.txt'),
959-
onProgress: (progress) {
959+
onProgress: (progress) => {
960960
safePrint('fraction totalBytes: ${progress.totalBytes}');
961961
safePrint('fraction transferredBytes: ${progress.transferredBytes}');
962962
safePrint('fraction completed: ${progress.fractionCompleted}');

0 commit comments

Comments
 (0)