Skip to content

Commit 516eeda

Browse files
committed
latest fix
1 parent 16a969d commit 516eeda

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import { Appwrite } from "appwrite";
3333
To install with a CDN (content delivery network) add the following scripts to the bottom of your <body> tag, but before you use any Appwrite services:
3434

3535
```html
36-
<script src="https://cdn.jsdelivr.net/npm/[email protected].0"></script>
36+
<script src="https://cdn.jsdelivr.net/npm/[email protected].1"></script>
3737
```
3838

3939

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "appwrite",
33
"homepage": "https://appwrite.io/support",
44
"description": "Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API",
5-
"version": "8.0.0",
5+
"version": "8.0.1",
66
"license": "BSD-3-Clause",
77
"main": "dist/cjs/sdk.js",
88
"exports": {

src/sdk.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,7 @@ class Appwrite {
827827
locale: '',
828828
};
829829
headers: Headers = {
830-
'x-sdk-version': 'appwrite:web:8.0.0',
830+
'x-sdk-version': 'appwrite:web:8.0.1',
831831
'X-Appwrite-Response-Format': '0.14.0',
832832
};
833833

@@ -2967,6 +2967,11 @@ class Appwrite {
29672967
}
29682968

29692969
const uri = new URL(this.config.endpoint + path);
2970+
2971+
if(!(file instanceof File)) {
2972+
throw new AppwriteException('Parameter "file" has to be a File.');
2973+
}
2974+
29702975
const size = file.size;
29712976

29722977
if (size <= Appwrite.CHUNK_SIZE) {

0 commit comments

Comments
 (0)