Make WordPress Core

Opened 13 years ago

Last modified 7 years ago

#24934 assigned enhancement

More flexible response reporting in wp-plupload.js

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

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 13 years ago.

Download all attachments as: .zip

Change History (11)

@ippetkov
13 years ago

#1 @chriscct7
11 years ago

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

#2 @wonderboymusic
11 years ago

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

#3 @wonderboymusic
11 years ago

  • Resolution → fixed
  • Status assigned → 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
11 years ago

  • Resolution fixed
  • Status closed → reopened

#5 @wonderboymusic
11 years ago

In 34047:

Revert [34009], broke uploads.

See #24934.

#6 @wonderboymusic
11 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
11 years ago

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

#8 @wonderboymusic
11 years ago

  • Keywords needs-refresh added

#9 @wonderboymusic
11 years ago

  • Owner wonderboymusic removed
  • Status reopened → assigned

#10 @wonderboymusic
11 years ago

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