You are close, you just need to hook into the add event instead of the reset event. (In case you did not know, these are standard events provided by Backbone collections. So familiarizing yourself with that will be helpful when developing things around stuff where WordPress employs Backbone.js.)
So basically you’d modify your code like this:
if (typeof wp.Uploader !== 'undefined' && typeof wp.Uploader.queue !== 'undefined') {
wp.Uploader.queue.on('add', function() {
console.log('image uploaded!');
});
}
Related Posts:
- How to change the text of the “You are about to permanently delete these items…” alert message when deleting media from the media library?
- Add tinymce buttons to caption textarea in media uploader
- How to handle multiple instance of “send_to_editor” js function
- Modify Custom Field in Media Library using JavaScript
- Script won’t execute in the media manager
- Is it possible to hide media details sidebar when wp.media popup is being opened?
- Getting all URLs of uploaded images using media uploader
- How to locate the js code and php code for certain function?
- wordpress file upload from direct directory not working
- Add jQuery function to media button
- JavaScript sleep/wait before continuing [duplicate]
- Why does my JavaScript code receive a “No ‘Access-Control-Allow-Origin’ header is present on the requested resource” error, while Postman does not?
- How do I link a JavaScript file to a HTML file?
- What does [object Object] mean? (JavaScript)
- Why does my JavaScript code receive a “No ‘Access-Control-Allow-Origin’ header is present on the requested resource” error, while Postman does not?
- How to set time delay in javascript
- JavaScript error (Uncaught SyntaxError: Unexpected end of input)
- JavaScript error (Uncaught SyntaxError: Unexpected end of input)
- jQuery equivalent of JavaScript’s addEventListener method
- Adding an onclick function to go to url in JavaScript?
- Checking a Url in Jquery/Javascript
- My javascript is returning this error: $.ajax is not a function
- Best way to store a key=>value array in JavaScript?
- Javascript Runtime error: $ is undefined
- JavaScript: filter() for Objects
- JavaScript runtime error: ‘$’ is undefined
- When and why to ‘return false’ in JavaScript?
- JavaScript Loading Screen while page loads
- Format date to MM/dd/yyyy in JavaScript
- How is JavaScript .on() method defined?
- Rotate image with javascript
- Javascript isnull
- How to make a simple image upload using Javascript/HTML
- Javascript TypeError: Cannot read property ‘indexOf’ of undefined
- JQuery: $.get is not a function
- How to get client’s IP address using JavaScript?
- javascript function wait until another function to finish
- Simple throttle in JavaScript
- How to read data From *.CSV file using javascript?
- Enable & Disable a Div and its elements in Javascript
- How can I expand and collapse a using javascript?
- How to call a webservice method from an html page [javascript] with out refresh the page
- Javascript – ERR_CONTENT_LENGTH_MISMATCH
- Javascript : array.length returns undefined
- The ‘describe’ keyword in javascript
- How can I remove all CSS classes using jQuery/JavaScript?
- Trigger refresh for new media manager in 3.5
- I want to enqueue a .js file to my child theme
- Using WordPress 3.5 Media Uploader in meta box?
- Is there a way to enable Cross-Origin Resource Sharing for WordPress’ ajaxurl?
- Custom “Uploads” Dir: “Edit Image” in Media Library broken
- WordPress AJAX File Upload – FrontEnd
- Can’t get a JSON object in response to an Ajax request with wp_ajax
- How to modify wp.media to get and display multiple images
- How to prevent wordpress from loading old versions of jquery in wp_head();?
- Move WordPress native javascript to bottom of page?
- WP 3.5 media manager – how to create a working gallery frame
- Add custom shortcode button to Editor
- Using the WordPress Media Library and returning the Attachment ID rather than URL?
- RequireJS in custom theme. Working Example
- Infinite scroll / lazy loading with NextGen Gallery [closed]
- Ajax call does not activate callback function
- Using ‘$’ instead of ‘jQuery’ in WordPress
- jQuery UI Datepicker not working
- Automatically decrease font size for long words
- How to get a jQuery script to run on a page?
- Defer Parsing of Scripts
- Extend 3.5 media uploader plugin to change button name
- How to get the image url in the input box from media library?
- WP3.5 Media Uploader – how to make it accept multiple images?
- Draggable item in custom gutenberg block
- Including javascript for a shortcode
- Javascript included but alert() function not working
- Adding fields to the media uploader with jquery listeners
- Asynchronous Javascript Loaders
- Trying to get single posts to load on the front page via ajax
- Ajax not firing properly using Firefox, but works in Chrome
- wp_enqueuescript won’t load in footer even with true value set?
- Unable to run jQuery script in my template file
- jQuery Hoverintent plugin in TwentyEleven Menu [closed]
- How to Use JSON With AJAX?
- Execution of JavaScript on save post
- How wp_enqueue_script works?
- Using wp_ajax and wp_ajax_nopriv hooks
- Prevent five different copies of jquery from being included on every page
- Hide/show customizer controls based on other settings in Customizer
- How do I get my page to load the jQuery UI Effects library?
- Is placing stuff in page text edit window bad form?
- Restrict file types in the uploader of a wp.media frame
- javascript is not working on Event Submission?
- How to properly add Bootstrap and JQuery Javascripts?
- Add colorpicker to featured image
- Gravity Forms not loading under https, jQuery is not defined
- How to add unique image class to WordPress
- WP Media uploader loading only once in options page
- Dropzonejs with WPCF7 [closed]
- Edit single attachment on click (WP-admin)
- Refreshing collections in the admin media manager
- Adding wp_enqueue_media(); causes problem
- jQuery Tree View and wp_list_pages