Make WordPress Core

Opened 15 years ago

Closed 15 years ago

Last modified 12 years ago

#19050 closed defect (bug) (fixed)

Media Upload - Cancel Upload Button

Reported by: landwire Owned by: azaozz
Priority: normal Milestone: 3.3
Component: Media Version: 3.3
Severity: normal Keywords:
Cc: Focuses:

Description

What should this button actually do? It cancels the upload while a file is uploading (progress bar moving), but once you have chosen a few files and they all have uploaded, I change my mind and do not want to go ahead with the upload. I press "Cancel Upload", but nothing happens. It should cancel my upload though....

Change History (18)

#1 @SergeyBiryukov
15 years ago

IMO, "Cancel Upload" button does exactly what it says: cancels the upload process. Once the images are uploaded, they can be explicitly deleted from Media Library if not needed.

#2 @SergeyBiryukov
15 years ago

  • Component GeneralMedia

#3 follow-up: @jane
15 years ago

  • Milestone Awaiting Review3.3
  • Owner set to azaozz
  • Status newassigned

Agree with Sergey. Cancel Upload should cancels uploads in progress. Deleting files because you changed your mind is not the same. That said, the Cancel Upload button seems to stay in active state even after crunching is finished, which does make it confusing, and it's inside the new uploader area. @azaozz: why is Cancel Upload still clickable when nothing is actively uploading?

#4 @jane
15 years ago

  • Type enhancementdefect (bug)

#5 follow-up: @SergeyBiryukov
15 years ago

I've also noticed that while "Cancel Upload" button immediately removes the progress bar (creating an impression that the upload is also immediately stopped), the file currently being uploaded silently finishes uploading anyway.

#6 in reply to: ↑ 3 @azaozz
15 years ago

Replying to jane:

@azaozz: why is Cancel Upload still clickable when nothing is actively uploading?

Seems to be a bug from the initial integration of Plupload (GSoC) that went unnoticed until now... Fixing.

#7 @azaozz
15 years ago

  • Resolutionfixed
  • Status assignedclosed

In [19099]:

Disable the Cancel Upload button after the upload has finished or if it was interrupted, fixes #19050

#8 in reply to: ↑ 5 ; follow-up: @nacin
15 years ago

  • Resolution fixed
  • Status closedreopened

Replying to SergeyBiryukov:

I've also noticed that while "Cancel Upload" button immediately removes the progress bar (creating an impression that the upload is also immediately stopped), the file currently being uploaded silently finishes uploading anyway.

#9 in reply to: ↑ 8 ; follow-up: @azaozz
15 years ago

Replying to nacin:

Don't think you can stop the browser finishing the uploading of the current file from JS, but patches welcome.

#11 in reply to: ↑ 9 ; follow-up: @SergeyBiryukov
15 years ago

Replying to azaozz:

Don't think you can stop the browser finishing the uploading of the current file from JS

Maybe we can reflect that in UI (e.g. by not removing current progress bar)?

#12 in reply to: ↑ 10 @azaozz
15 years ago

Replying to ocean90:

Maybe possible with chunked upload?

By default we are not using chunking, it doesn't work well in all browsers when using the HTML5 runtime that supports drag & drop.

On the other hand we could try to hook at the HXR and use abort(), not sure if that's exposed though.

Version 0, edited 15 years ago by azaozz (next)

#13 in reply to: ↑ 11 ; follow-up: @azaozz
15 years ago

Replying to SergeyBiryukov:

Maybe we can reflect that in UI (e.g. by not removing current progress bar)?

I'm starting to think we should drop the Cancel button completely. Other similar setups don't have "cancel" either (like G+). Users can cancel by closing the popup/reloading the page.

#14 in reply to: ↑ 13 @jane
15 years ago

Replying to azaozz:

I'm starting to think we should drop the Cancel button completely. Other similar setups don't have "cancel" either (like G+). Users can cancel by closing the popup/reloading the page.

Fine by me.

#15 follow-up: @olleicua
15 years ago

  • Cc olleicua@… added

It occurs to me that a small 'x' appearing in the loading bar only during the upload might be really helpful if for example someone mis-clicks and gets the wrong file.

#16 in reply to: ↑ 15 @azaozz
15 years ago

Replying to olleicua:

The problem is that we can't cancel the currently uploading file from JS (for now). Only way would be to reload the page or close the popup.

#17 @azaozz
15 years ago

  • Resolutionfixed
  • Status reopenedclosed

In [19127]:

Remove the Cancel Upload button, fixes #19050

#18 @ericlewis
12 years ago

#22894 was marked as a duplicate.

Note: See TracTickets for help on using tickets.