1
0
Fork 0
mirror of synced 2024-06-29 11:40:45 +12:00

fix examples

This commit is contained in:
Damodar Lohani 2022-03-03 17:45:20 +00:00
parent 19c864e049
commit a4f183cc62
2 changed files with 3 additions and 3 deletions

View file

@ -41,7 +41,7 @@ Upload File:
```dart
Storage storage = Storage(client);
InputFile file = InputFile(path: './path-to-file/image.jpg', fileName: 'image.jpg');
InputFile file = InputFile(path: './path-to-file/image.jpg', filename: 'image.jpg');
storage.createFile(
bucketId: '[BUCKET_ID]',

View file

@ -40,9 +40,9 @@ Storage storage = Storage(client);
late InputFile file;
if(kIsWeb) {
file = InputFile(file: MultipartFile.fromFile('./path-to-file/image.jpg', filename: 'image.jpg'));
file = InputFile(file: await MultipartFile.fromFile('file', './path-to-file/image.jpg', filename: 'image.jpg'));
} else {
file = InputFile(path: './path-to-file/image.jpg', fileName: 'image.jpg');
file = InputFile(path: './path-to-file/image.jpg', filename: 'image.jpg');
}
storage.createFile(