Skip to content

Commit 9723254

Browse files
fix: changes for 0.13.0
1 parent 37ba6c1 commit 9723254

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
## 4.0.0
2+
* Support for Appwrite 0.13
3+
* **BREAKING** **Tags** have been renamed to **Deployments**
4+
* **BREAKING** `createFile` function expects Bucket ID as the first parameter
5+
* **BREAKING** `createDeployment` and `createFile` functions expect an instance **InputFile** rather than the instance of **MultipartFile**
6+
* **BREAKING** `list<Entity>` endpoints now contain a `total` attribute instead of `sum`
7+
* `onProgress()` callback function for endpoints supporting file uploads
8+
* Support for synchronous function executions
9+
* Bug fixes and Improvements
10+
11+
**Full Changelog for Appwrite 0.13 can be found here**: https://github.com/appwrite/appwrite/blob/master/CHANGES.md#version-0130
12+
113
## 3.0.1
214
- Export Query Builder
315

example/README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,17 @@ Upload File:
3737
```dart
3838
Storage storage = Storage(client);
3939
40-
MultipartFile file = MultipartFile.fromFile('./path-to-file/image.jpg', filename: 'image.jpg');
40+
late InputFile file;
41+
42+
if(kIsWeb) {
43+
file = InputFile(file: MultipartFile.fromFile('./path-to-file/image.jpg', filename: 'image.jpg'));
44+
} else {
45+
file = InputFile(path: './path-to-file/image.jpg', fileName: 'image.jpg');
46+
}
4147
4248
storage.createFile(
43-
fileId: '[FILE_ID]',
49+
bucketId: '[BUCKET_ID]',
50+
fileId: '[FILE_ID]', // use 'unique()' to automatically generate a unique ID
4451
file: file,
4552
read: ['role:all'],
4653
write: []

0 commit comments

Comments
 (0)