Skip to content

Instantly share code, notes, and snippets.

@mikejolley
Last active Dec 10, 2015
Embed
What would you like to do?
// When an image is selected, run a callback.
file_frame.on( 'select', function() {
var selection = file_frame.state().get('selection');
selection.map( function( attachment ) {
attachment = attachment.toJSON();
// Do something with attachment.id and/or attachment.url here
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment