
Hey ! Hope you are doing well.
I have created a CSV as a string inside an appwrite function. Unfortunately The File class not being present on nodeJs prevents me from creating a File from my Blob and uploading it to the storage with the SDK.
(I have tried to implement a pseudo File class by adding name and type to the Blob. But when testing I get accessing .pipe error on undefined.)
Is there a way to achieve the desired result? Maybe via the rest API using formData ? The doc says File type but does it accept formData instead?
I am not at home now so I can't really test, But maybe someone has already encountered the same issue.Or have an idea for my next try.
Thanks for reading!

Deno seems to have File class support.

For deno and node, you should be using the InputFile class

Thanks for the hint! I can't find inputFile class on the web for Js, (Only for dart) Do you have a Link please 馃ズ?

Didn't you say you're using deno/node?

Yes I use deno or node but I can't find any references of this class on Google.

Would you please make sure you're using the node or deno sdk rather than web?

Oh sry I was thinking this was a native JavaScript Class. I didn't even try to use the appwrite SDK 馃樀

Thanks

All good now?

I can't test it for now but yeah it should be good. Thanks for your help!

This is exactly what I was looking for

[SOLVED] Rest API upload File as a Blob or fromData in nodejs
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"...
- Function running in cloud but not locall...
Hi everyone, I have an appwrite function which is on python3.12 runtime. I have a library (hnswlib) which builds wheels during installation. This works on appwr...
- Permissions for bulk operation
Hi team, I have a question: 鈥淚n the databases.createDocuments bulk API, can I set document-level permissions? If yes, how exactly should I include the permissio...
