fix examples
This commit is contained in:
parent
19c864e049
commit
a4f183cc62
2 changed files with 3 additions and 3 deletions
|
@ -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]',
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue