WordPress.org

Make WordPress Core

Opened 6 years ago

Last modified 5 months ago

#24934 assigned enhancement

More flexible response reporting in wp-plupload.js

Reported by: ippetkov Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 3.6
Component: Upload Keywords: needs-patch
Focuses: Cc:
PR Number:

Description

The wp-plupload.js wrapper to the plupload library only returns server responses to bound callbacks in the case of a well formed error (the server responds with { success: false } ).

Sometimes it may be useful to receive additional information from the server on successful upload. I have prepared a patch that allows for the success and error callbacks to receive server responses.

Attachments (1)

24934.diff (1.0 KB) - added by ippetkov 6 years ago.

Download all attachments as: .zip

Change History (11)

@ippetkov
6 years ago

#1 @chriscct7
4 years ago

  • Keywords needs-refresh needs-testing added
  • Milestone changed from Awaiting Review to 4.4
  • Owner set to chriscct7
  • Status changed from new to assigned

#2 @wonderboymusic
4 years ago

  • Keywords needs-refresh needs-testing removed
  • Owner changed from chriscct7 to wonderboymusic

#3 @wonderboymusic
4 years ago

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

In 34009:

WP Plupload: on FileUploaded, allow success and error callbacks to receive server responses after a successful upload.

Props ippetkov.
Fixes #24934.

#4 @wonderboymusic
4 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

#5 @wonderboymusic
4 years ago

In 34047:

Revert [34009], broke uploads.

See #24934.

#6 @wonderboymusic
4 years ago

On a successful upload, false-positive errors are propagating to the front end. Uploads that were successful aren't appearing until a full-page refresh.

#7 @kitchin
4 years ago

The problem was the early return after else {, not the self.success data at the end.

#8 @wonderboymusic
4 years ago

  • Keywords needs-refresh added

#9 @wonderboymusic
4 years ago

  • Owner wonderboymusic deleted
  • Status changed from reopened to assigned

#10 @wonderboymusic
4 years ago

  • Keywords needs-patch added; has-patch needs-refresh removed
  • Milestone changed from 4.4 to Future Release
Note: See TracTickets for help on using tickets.