
I'm sorry if I did something wrong when I try to upload a file with InputFile.fromPath, but I can't figure what.
I'm on node v.18 and node-appwrite v.13
var sdk = require('node-appwrite');
var fs = require('fs');
const client = new sdk.Client()
.setEndpoint('https://cloud.appwrite.io/v1')
.setProject('<projectID>')
.setSession('');
const storage = new sdk.Storage(client);
storage.createFile(
'<bucketID>',
'unique()',
sdk.InputFile.fromPath('out.png', 'out.png'),
["read('any')"]
);
```
My image is on the same level than my index.js.
... sdk.InputFile.fromPath('out.png', 'out.png'), ^ TypeError: Cannot read properties of undefined (reading 'fromPath')
Many thanks for your help.
Recommended threads
- Hola equipo de soporte,
Hola equipo de soporte, Estoy desarrollando una Function en Appwrite Cloud con Node.js 22 y el siguiente package.json: { "name": "upload-whitelist", "type"...
- [Node.js SDK] Bypass 2GB file limit?
Hello. Using either InputFile.fromPath or InputFile.fromBuffer throws this error: File size (2295467305) is greater than 2 GiB Bucket limit etc. is setup corre...
- Hi im using vvs studio to make a charact...
my game involves magic , leveling up aka "phase" max phase is 30 each 10 20 30 theres awakening 1 2 3 i want to make a character builder so that players can fig...
