Rank 2: Process
check this
Votes
0
Replies
24
Participants
Unknown
Messages
25
Rank 2: Process
check this
Rank 2: Process
is it same in your code?
Rank 2: Process
/files/${fileId}
Rank 2: Process
yes
Rank 2: Process
hmm
Rank 2: Process
I have this:
const response = await fetch( `https://cloud.appwrite.io/v1/storage/buckets/${bucketId}/${fileId}`, requestOptions ); // here is varRank 2: Process
ho almost
Rank 2: Process
I copied the updated code quickly
Rank 2: Process
const response = await fetch( `https://cloud.appwrite.io/v1/storage/buckets/${bucketId}/files/${fileId}`, requestOptions ); // here is varRank 2: Process
use this
Rank 2: Process
Same error
Rank 2: Process
ok
Rank 2: Process
let use appwrite sdk
Rank 2: Process
let me test it on my project then i will share the code.
Rank 2: Process
Ho, thank you !
Rank 2: Process
avatars.getInitials(userName, 64, 64).then((buffer) => { fs.writeFile("image.png", buffer, (err) => { if (!err) { sharp("image.png").toFile("output.png", (err, info) => { if (!err) { console.log("Image was successfully converted:", info); storage.createFile( bucketId, "MyFidddleID", sdk.InputFile.fromPath("output.png", "Tesdst.png") ); } }); } });});Rank 2: Process
This code seems to work !!!!
Rank 2: Process
Thank you for your help 🙂
Rank 2: Process
One thing strange if I execute the code, remove the file in Appwrite storage re-execute the code after changing the userName I get the old file
Rank 2: Process
Cool
Rank 2: Process
Maybe due to cache image data on your frontend.
Rank 2: Process
Or it shows same on storage console too?
Rank 2: Process
No it shows the same on the console.
Rank 2: Process
I was able to fix the problem by remove the file with the sdk not from the console
Rank 2: Process
Okay