Make WordPress Core

Opened 12 years ago

Closed 12 years ago

Last modified 9 years ago

#19050 closed defect (bug) (fixed)

Media Upload - Cancel Upload Button

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

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
12 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
12 years ago

  • Component changed from General to Media

#3 follow-up: @jane
12 years ago

  • Milestone changed from Awaiting Review to 3.3
  • Owner set to azaozz
  • Status changed from new to assigned

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
12 years ago

  • Type changed from enhancement to defect (bug)

#5 follow-up: @SergeyBiryukov
12 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
12 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
12 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

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
12 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

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
12 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
12 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
12 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 or if the browsers would execute it.

Last edited 12 years ago by azaozz (previous) (diff)

#13 in reply to: ↑ 11 ; follow-up: @azaozz
12 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
12 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
12 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
12 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
12 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In [19127]:

Remove the Cancel Upload button, fixes #19050

#18 @ericlewis
9 years ago

#22894 was marked as a duplicate.

Note: See TracTickets for help on using tickets.