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
- All My Project is Gone
Hello everyone, please help. Why have all my projects suddenly disappeared? I received a warning via email about one of my projects being paused. When I clicked...
- Appwrite for Education
I am writing to report an issue with my account limits. I currently have the GitHub Student Developer Pack active, which should include 10 Appwrite Pro projects...
- How to stop my project from being frozen...
So we encountered an error in production because our appwrite project had been frozen due to inactivity. Is there any way of automating checking in and activity