New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Display Upload Progress as Percentage and File Size / Total File Size (Take Two) #3111
feat: Display Upload Progress as Percentage and File Size / Total File Size (Take Two) #3111
Conversation
cool! |
@maeryo Yep! Multiple directories (i do find it odd that it doesn't show the directory name being uploaded as well) |
frontend/src/stores/upload.ts
Outdated
const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']; | ||
const i = Math.floor(Math.log(totalSize) / Math.log(1024)); | ||
return parseFloat((totalSize / Math.pow(1024, i)).toFixed(2)) + ' ' + sizes[i]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code segment is duplicated and can be extracted into a common function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll take a look at that. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Went and implemented this! d29dee3
Is it just me, or if ur uploading more than one file simultaneously, the download speed is wrong? 1 file displays 9mb/s while 5 files shows 1.5mb/s or something like that. |
@kloon15 I'll try to reproduce that and if I can, I'll patch it up. Good catch! |
And if u could format ur code with |
@kloon15 Ahhhhhhhhh, I committed a few seconds too late, I just ran the |
No worries, ill double check it tomorrow, maybe it was a one time thing, could have been a network issue or smth. |
I just tested it again, as soon as i add a second file, the indicated speed drops to about half of what it was before: |
@kloon15 Thanks! Although it appears this existed before my branch though, since this seems to exist in master without my changes. In master the speed did eventually go up, although a bit slower than before (which is expected, since I was uploading more files now.) And I do see the issue in my branch as well. I think this already existed, although I wonder if it's a bug or the upload libraries getting things together? Because it eventually levels out to near what it was. @kloon15 did you see the same thing with the speed leveling out as well? |
No it has nothing to do w ur branch or modifications, just brought it up since ur adding/reworking to it and that maybe smth is wrong w it. |
I have observed that when I choose to upload a file that already exists, the "replace" modal window appears briefly and then disappears immediately. However, this behavior is not replicated when I use the drag-and-drop feature. I'm going to merge this PR since this issue is not related to it. Nevertheless, it would be great if one of you (@kloon15, @alexjyong) could take a closer look into this matter. |
Description
(Re-do of PR 3079. Between a few glitches that I found combined with the migration to Vue 3 and all the conflicts it made, I figured it would be easier to just spin up a new PR.)
Uploads will now show progress as percentage and file size /total file size of all files being uploaded.
I noticed this was missing when I was uploading files to my server. Figured it would be useful for determining how much is left beyond just an ETA.
Didn't see any issues related to this however.