Back

[Solved] Progress Bar for storage uploads

  • 0
  • Web
  • Storage
BloodThermic
29 Nov, 2023, 07:47

Is there a way to get a progress bar for the status of uploads to the server.

TL;DR
The user has solved their issue with creating a progress bar for storage uploads using Svelte and JavaScript. They used the `storage.createFile` method with a callback function to update the progress. They also asked about checking the progress of uploaded chunks and were informed that the progress is only available in 5MB chunks.
Drake
29 Nov, 2023, 18:21

yes, there's a callback to the create file method. However, the progress is only in 5MB chunks

BloodThermic
29 Nov, 2023, 21:24

something is better then nothing

BloodThermic
29 Nov, 2023, 22:17

is there any specific way that I should submit the file to get progress

Drake
30 Nov, 2023, 00:48

no

BloodThermic
30 Nov, 2023, 00:49

How do i check the chunks uploaded as it progresses

BloodThermic
30 Nov, 2023, 02:00

Got it thank you!

BloodThermic
30 Nov, 2023, 02:00

const uploadPromise = storage.createFile( getlinkedData.documents[0].bucketId, ID.unique(), draggedFiles[0], [], (progress) => { console.log(progress.progress) uploadProgress.set(progress.progress) // Update the Svelte store }

BloodThermic
30 Nov, 2023, 02:01

This is the ending code I got to make it work with JS. I am using SveltekIt

BloodThermic
30 Nov, 2023, 02:01

[Solved] Progress Bar for storage uploads

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more