mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Merge pull request #2893 from appwrite/fix-flutter-sdk
Fix Flutter/Dart SDK examples
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user