check this
is it same in your code?
/files/${fileId}
yes
hmm
I have this:
const response = await fetch(
`https://cloud.appwrite.io/v1/storage/buckets/${bucketId}/${fileId}`,
requestOptions
); // here is var
ho almost
I copied the updated code quickly
const response = await fetch(
`https://cloud.appwrite.io/v1/storage/buckets/${bucketId}/files/${fileId}`,
requestOptions
); // here is var
use this
Same error
ok
let use appwrite sdk
let me test it on my project then i will share the code.
Ho, thank you !
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")
);
}
});
}
});
});
This code seems to work !!!!
Thank you for your help π
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
Cool
Maybe due to cache image data on your frontend.
Or it shows same on storage console too?
No it shows the same on the console.
I was able to fix the problem by remove the file with the sdk not from the console
Okay
Recommended threads
- Worker functions stuck on "Fetched 0 fun...
Appwrite Version: 1.9.0 Bug Description: The appwrite-worker-functions container gets stuck in an infinite loop logging "Fetched 0 functions..." while scheduled...
- I am using s3 for app storage but is it ...
_APP_STORAGE_DEVICE=s3 puts everything to the s3 storage but i need to be able to keep the function builds and site in the local and not waste the cloud storage...
- Local Serverless Function Testing: Are D...
I have followed the instructions to get the CLI working, and have been able to log-in, initialize my project, and created a simple Python function, which calls ...