That's meant for Appwrite 1.4 so it might not be a good idea to use that
the console doesn't show it, how can I see that?
I understand which one do you recommend to use with appwrite cloud?
Appwrite cloud is on 1.1.2. You should read the readme for the SDK to see what version that version of the SDK is for
change my appwrite version to "node-appwrite": "^8.2.0" and i think i manage to show the stack trace:
i think is the line 185 of the code, which is the storage.createFile() function
So node SDK version 8.2.0...you need to pass InputFile to create file
What is response.body? What type?
A buffer?
the response.body is a json string that looks like this:
Is that what you were referring to?
So file.write(response.body) writes JSON to the file?
oh no the axios response.body is different, it looks like this in the console:
its looks like binary data of the file
Could you maybe log typeof response.body?
If you're using axios, I think you can get the response as a stream: https://masteringjs.io/tutorials/axios/response-body
Then, you'd use InputFile.fromStream() https://github.com/appwrite/sdk-for-node/blob/6cb6f1c32f319a026c4aa8b7f8278bd891b259bf/lib/inputFile.js#L29
thank you steven, I'll take a look about this
i was looking more into the appwrite docs and does the InputFile thing is it mandatory in order to work right?
It now works and the files are uploaded <:appwritecheers:892495536823861258>
the only thing is that it takes a long time and the timeout is executed earlier and raising it too much I don't think is a good idea, I will look for a way to optimize this function so that it doesn't take so long
for now thank you very much steven
where are you located?
[SOLVED] Storage Question
Recommended threads
- Appwrite Auth & Function don't reveal cl...
When I execute a function or sign in with my Flutter app, Appwrite does not show my real IP: instead, it seems that Appwrite shows Fastly CDN IP address.
- All function deployments fail (node 18-2...
Error: bash: /usr/local/server/helpers/build-cache.sh: No such file or directory Sidecar error: Build archive was not created at /mnt/code/code.tar.gz Scope: ...
- Database Write Limits hit
Hello Appwrite Admins, I'm a GitHub Education user, and about a week ago, my database was really badly optimized, resulting in about 600k writes in a single day...