Add file upload progress indicator
valp124 opened this issue ยท 18 comments
When uploading large files from File Manager, it's always a nail-biter waiting for the magic to happen. It would be super useful to see the progress of the upload, or at least have some kind of indicator that it's still in progress. The browser automatically takes care of that for the downloads, wish it were the case for uploads, as well...
Thanks a bunch!
I'll look into that. The current upload mechanic used is via fetch
which does not support progress events, sadly. However XMLHttpRequest
does, which should be fairly easy to add support for and should not impact performance.
Note to self:
- Add abstraction for XMLMHttpRequest that is identical to the fetch one
- Add progress event callback to upload VFS api function options
- Add support for optional text in progress dialog
- Update the upload api dialog with new option and add translation texts
This has been implemented ๐
You have to update the following packages:
osjs/client
osjs/dialogs
osjs/filemanager-application
Initial thoughts are:
- One of the packages did not get updated
npm run build
was not executed- cache ?
Hold on... I think might have forgotten something here on my end ๐
I was gonna say, check on all three items ;)
Sorry about that... I forgot to add a detection of which progress to use. What you saw was the response (2 bytes) ๐ Update @osjs/client
and it should display correctly.
Also, I just realized that the upload is a modal -- that's not really good UX. I'll take care of that one.
I'll take care of that one.
@osjs/filemanager-application
has been updated wit this.
Awesome, the progress is working! ๐
Sweet!
If you want any changes or improvements to this, please file an issue here: https://github.com/os-js/osjs-filemanager-application
I just pinged you in an issue you made about the UI gitch there.
As for resizing, hold and drag your cursor between the panes (the gray space). You should get a cursor indication when you're at the correct spot.
Yep, resizing the pane works, but the file names remain cut. And yes, I can see the issue I have submitted. Memory, my man, doesn't work the same way as before at my age ๐ค
My memory is starting to degrade as well... but so far only the less important stuff is getting garbage collected. Let's hope it stays like that ๐ Well, then we can continue the discussion there. I left a quick Q for you there.
Hey, wanted to report back from the trenches. Spotted a slight error. If you close the progress window while the file is being uploaded, the action is understood correctly, and the upload is cancelled, but there is an error popup:
The full error text is:
TypeError: Cannot read property 'destroy' of null
at n.value (https://webgs.slb.com:8443/vendors~osjs.js:72:41249)
at https://webgs.slb.com:8443/apps/FileManager/main.js:1:44431
Not a big deal, just sayin ๐
oopsie daisy! I've published a new version of @osjs/dialogs
that should fix this problem ๐
You're awesome, man. You really are!