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
|
```dart
|
||||||
Storage storage = Storage(client);
|
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(
|
storage.createFile(
|
||||||
bucketId: '[BUCKET_ID]',
|
bucketId: '[BUCKET_ID]',
|
||||||
|
|
|
@ -40,9 +40,9 @@ Storage storage = Storage(client);
|
||||||
late InputFile file;
|
late InputFile file;
|
||||||
|
|
||||||
if(kIsWeb) {
|
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 {
|
} 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(
|
storage.createFile(
|
||||||
|
|
Loading…
Reference in a new issue