Skip to content

Feature/node sdk file upload - #158

Closed
kimuraz wants to merge 2 commits into
appwrite:masterfrom
kimuraz:feature/node-sdk-file-upload
Closed

kimuraz wants to merge 2 commits into
appwrite:masterfrom
kimuraz:feature/node-sdk-file-upload

Conversation

@kimuraz

@kimuraz kimuraz commented Oct 8, 2019

Copy link
Copy Markdown

No description provided.

@nsittia nsittia mentioned this pull request Oct 8, 2019
@eldadfux

Copy link
Copy Markdown
Member

Hey @kimuraz , really appreciate the effort, but I think you misunderstood the scope of this issue.

All of Appwrite SDKs are auto-generated by our SDK Generator, who has a separated repo: https://github.com/appwrite/sdk-generator.

This issue is meant for adding support to the NodeJS HTTP client template to allow it to send multipart/form requests while handling payload and attached files properly. I guess the best way to understand this requirement is to take a look at the PHP client template who is already implementing this feature.

We should also make sure that file upload is working, by generating the templates to a functioning SDK code and testing the 'createFile' method.

@eldadfux eldadfux closed this Oct 12, 2019
@kimuraz

kimuraz commented Oct 12, 2019

Copy link
Copy Markdown
Author

Sorry for that, I'll take a further look at the generator...

Although, if it does have any usage, the script I used to test it was:

const sdk = require('../appwrite/app/sdks/node/index.js');                                                                                                                        
const fs = require('fs');
// Init SDK
let client = new sdk.Client();
client.setEndpoint('http://appwrite.test/v1');

let storage = new sdk.Storage(client);

client.setProject('').setKey('');


let promise = storage.createFile(fs.createReadStream('./img.jpg'), [], [], '1');

promise.then(function (response) {
  console.log(response);
  console.log(error.statusCode);
}, function (error) {
  //console.log(error);
  console.log(error.statusCode, error.message, 'ERR');
});

debojyoti-dev pushed a commit to debojyoti-dev/appwrite that referenced this pull request Sep 16, 2026
fix(lock): jitter the distributed acquire backoff
NancyWei123 pushed a commit to NancyWei123/appwrite that referenced this pull request Sep 27, 2026
* fix: improve chunk joining process with error handling

* fix: enhance chunk joining process with improved error handling and cleanup

* format
Thegreatsura pushed a commit to Thegreatsura/appwrite that referenced this pull request Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants