Merge pull request #2893 from appwrite/fix-flutter-sdk

Fix Flutter/Dart SDK examples
This commit is contained in:
Eldad A. Fux
2022-03-03 20:35:54 +02:00
committed by GitHub
2 changed files with 3 additions and 3 deletions
+1 -1
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]',
+2 -2
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(