WordPress.org

Make WordPress Core

Opened 4 years ago

Last modified 3 years ago

#30384 new enhancement

Cannot hook plupload's JavaScript consistently

Reported by: tomdxw Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.0
Component: Upload Keywords: needs-patch
Focuses: Cc:

Description

Visit /wp-admin/media-new.php and enter the following into the console:

window.uploader.bind('FileUploaded', function (){alert(1)})

Upload a file and once that's complete your function will be executed.

However if you visit /wp-admin/upload.php or /wp-admin/post-new.php and run that JavaScript you'll find that window.uploader is undefined.

I'm trying to prompt users to add additional information about the images they upload, but without access to the Uploader object that appears to be impossible.

Change History (1)

#1 @chriscct7
3 years ago

  • Keywords needs-patch added
Note: See TracTickets for help on using tickets.