My code -
storage.createFile(
BUCKET_ID,
ID.unique(),
file,
[],
(progress) => console.log(progress)
);
After executing this code, nothing gets printed in the console.
can you show more code?
const handleUploadFile = async () => {
try {
await storage.createFile(
BUCKET_ID,
ID.unique(),
file,
[],
(progress) => console.log(progress)
);
} catch (error) {
console.log(error);
}
};
The file is uploaded to the bucket and just the progress callback is not working. Maybe it's not working with appwrite cloud and might work with locally hosted appwrite.
Btw, you can format multi line code using 3 back ticks. See https://www.markdownguide.org/extended-syntax/#syntax-highlighting
why don't you give this a try? if it works on localhost, we know that it's an issue with the cloud instance
Okay, I will try the locally hosted version.
let me know! I'm here to help
I tried storage API on the local appwrite install and the progress callback was not working.
Idk, what to do next. I mean, the only code that is responsible for uploading is the handleUploadFile function and there is no problem with it.
just to be sure, you're using js right? I want to try and figure this out lol
Have you tried it out yourself? 😜
nope, but I'm planning to which is why I want to figure this out lol
Yeah, I am using JavaScript
@safwan Hey, any update?
FYI, multi-line code formats better with 3 back ticks. see https://www.markdownguide.org/extended-syntax/#syntax-highlighting
how big is your file?
I tried uploading multiple files of different sizes like 800 KB, and 5 MB in Slow 3G network throttling mode.
ah I forgot about this mate 😅 I'll get to it now
So we chunk our uploads in 5MB increments. So to see the progress, you'd have to upload bigger than 5MB
This doesn't help me. Images are usually less than 5 MB and with no visual progress indicator the client will go crazy.
The upload progress should be visible for every file. Please add this feedback in your roadmap or any list that appwrite follows.
No problem. I understand we do a lot of things every day. Anyway I got my answer.
You are welcome to create a feature request: https://github.com/appwrite/appwrite/issues/new/choose
Okay, I will create the feature request.
Recommended threads
- restore paused project not working
https://cloud.appwrite.io/console/project-sfo-69b1b841002ca6a07f14/overview/platforms
- Realtime doesn't seem to work with Table...
Hi, I am trying to connect my tables rows with realtime on my react website, it connects, but I dont get the rows when a row is being created. I tried with Chan...
- Failed to receive appwrite reset passwor...
Hey there, I forgot my password for my appwrite account but when i use forgot password, i dont get an email to reset the account but when i try to create a new ...