Skip to content

Commit b9b641c

Browse files
fix: file upload
1 parent cf1efb8 commit b9b641c

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/client.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class Client {
1010
this.endpoint = 'https://HOSTNAME/v1';
1111
this.headers = {
1212
'content-type': '',
13-
'x-sdk-version': 'appwrite:nodejs:7.0.0',
13+
'x-sdk-version': 'appwrite:nodejs:7.0.1',
1414
'X-Appwrite-Response-Format' : '0.15.0',
1515
};
1616
this.selfSigned = false;

lib/services/functions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ class Functions extends Service {
393393
}
394394

395395
const stream = Stream.Readable.from(currentChunk);
396-
payload['code'] = { type: 'file', file: stream, filename: file.filename };
396+
payload['code'] = { type: 'file', file: stream, filename: code.filename };
397397

398398
response = await selfClient.call('post', path, headers, payload);
399399

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "node-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": "7.0.0",
5+
"version": "7.0.1",
66
"license": "BSD-3-Clause",
77
"main": "./index.js",
88
"types": "./index.d.ts",

0 commit comments

Comments
 (0)