Cancel upload button
Describe the idea / solution you'd like A cancel upload button. I have started uploading a couple zip files to a folder which then I realized it was the wrong folder, I now wanted to cancel the uploads and use the correct folder, but for the love of god, I could not find a cancel button, am I stupid / blind (perhaps both?)?
Describe any alternatives you've considered None, a cancel button is somewhat essential.
Additional context Or, given by the existence of this issue, make the cancel button more obvious.
I would imagine something like this:
"CANCEL ALL" is self explanatory.
But, for ease of use, put an "X" symbol next to each uploading file (either on the right, in the middle or on the left, I don't care) with an additional "X" in the yellow-marked area for an alternative "CANCEL ALL" method.
Interested in seeing your thoughts on that.
it is well-hidden; uploads can currently be aborted by first refreshing the page and then hitting abort in the 🧯unpost tab --
I have a strong suspicion that any attempt at removing a file from the middle of the upload queue would cause the current UI to crash and burn, so it's not really tempting to give it a shot, but maybe if there's some idle time at some point
Unfortunate to hear that a cancel button was so overthought in the design of copyparty, appreciate the answer nonetheless.
An idea I had which, maybe (I did not look at the code of copyparty) could work by (ab)using copyparty's pause function:
- send server upload "pause" request
- tell "client" we scrapped the upload, just... remove it from wherever this current upload exists
- tell server to delete processed chunks
Maybe that would work, but I guess not. Why I think it might: deleting files is possible, pausing uploads is possible, so each "step" of cancelling an upload is itself possible.
the main reason such a button was never added was I didn't really see the point; regardless:
the issue with adding it now is how the list of files is shown in the UI, and how the upload queue works, which is an array that's referenced by offsets into it, and all of the different things which are independently doing this all share the same assumption that the list will be contiguous.
further, I'm still not sure whether adding additional cancel buttons would be very useful, because it would only cover a small handful of usecases regardless -- if you want to cancel all uploads that haven't been started yet then you can do that by refreshing the page, and if you want to abort an upload that has begun then that is possible in the 🧯unpost tab, again after refreshing so the spaghetti stays on the plate.
by adding a separate cancel/abort link to each file, it would have been possible to abort a small handful of very large uploads which you realize you didn't want to add, but that's the only situation it would help against -- if you want to abort all scheduled uploads, there's already the option to refresh?
I'm not sure how related or not my experience is, but I find that deleting and/or aborting uploads causes stalls in the web server's responsiveness, sometimes to the extent of getting HTTP 502 GATEWAY TIMEOUTs from Nginx—and once to the extent of the server fully locking up and requiring a restart of copyparty. I have a gut feeling its caused by the user fighting with the lagging UI on delete/abort and copyparty getting upset because its busy with the DB indexing stuff and won't let you write or delete in that time (AFAIA).
My config options I think might be relevant?:
[global]
nc: 1024
j: 4
e2dsa
e2ts
re-maxage: 60
snap-wri: 180
magic
u2j: 4
u2abort: 3
# db-act is unspecified and left at default (10 sec). My understanding of it is weird; does it mean that I upload, the upload finishes, it waits 10 seconds, and indexes the changes (and thus during that time I can't do anything)? If that's true, wouldn't it help the issue to set it to like 600? Or would that be evil
# I did just notice that the `s-tbody` says set to `0` if behind a reverse proxy? Is it the same for `s-thead`? Is it even related at all?
(Apologies if this is actually not adjacent or related. I looked in the issues list and this seemed to be the single thing closest to what's happening to me but my understanding is poor :3)
Maybe just add a little hint-text for now how to cancel that? I tried to upload Zomboid-Save to this and only learnt how to cancel through this issue.