
how are you reading the file? there's a method in node-appwrite https://appwrite.io/docs/references/cloud/server-nodejs/storage#getFilePreview

i've also trying with path function also same thing

the path function is for uploading

yes i have ready it too it base on this doc that i've write my code so

ok, so after you're doing the upload you can see the actual file in the bucket inside the appwrite console?

yes the file is in the storage

now you wanna get the file url for preview/download in nodejs
not a browser correct?

if so node-appwrite
return the file in buffer format, then depending on what you wanna do with the file (send it to a browser, or store it in the server requesting the file) you have to handle that yourself

is that it?

no in fact i have already have the file in a physical folder right ? so im just trying tu send in to the selfhost storage file and the upload is ok... but the problem is on the preview

i want tu upload it yo the self hosted and

are you being able to upload the file from your code and after that the file is present in the console?

by console I mean Appwrite console

exactly

but the content of the is different

so you can mark this task as complete

ok different how?

after uploading the file the content is being different?

after uploading the file what are you seeing in storage in the console same place the screenshot?

ok so i have the file imag.jpg that's i on my folder and when you open in my comput the file is open normaly but after upload it usind node-appwrite sdk storage function SelfHoted_storage.createFile(
bucket.$id,
element.$id,
InputFile.fromBuffer(file, ${element.name})
the file content in console have change to �����JFIF���������ICC_PROFILE��������0��mntrRGB XYZ ......
text

but if i'm using the sonsole everthing work fine

can you post the code?

I just test it an upload from node-appwrite 12.0.1
and it's working fine

maybe the 8.0 is not forward compatible

ok i will try to upgrade the libray and test
Recommended threads
- Is it possible to cancel an ongoing file...
When uploading a file to storage, is there a way to cancel the upload in progress so the file is not saved or partially stored?
- File level security overrides File Token...
are file tokens not supposed to work with file level security? so if i make it such that only the user who uploads the file has read access and i then create a ...
- Can't start docker containers beacuse no...
Hi, I'm testing my app where I upload also files to appwrite storage. As I suspect, I've filled up my disk. Now I can't start Appwrite. Could I ask for help wit...
