How do i get % of file uploaded in ipfs-js

so i was making a file upload mechanism and i thought if there was a way in which i can determine how much percentage of file is uploaded to the network in realtime.
so, if the file is larger, the user will know how much time it will take to upload the file…

i am using js-ipfs nom package in a svelte application.