I have an image file field on my Drupal 7 site that allows users to add 4 images. I would like to give my users the ability to load all 4 images at once. I have discovered the plupload module and plup library which should be able to let me do this. However, I have yet to discover an configuration (including the media module) which allows me to do this. How can I make this functionality work?
2 Answers
After installing plupload module and placing plupload libraries, create an image file upload field and select Plupload widget. Itz done.
Add this js in your custom js file.
(function ($) {
Drupal.behaviors.autoUpload = {
attach: function (context, settings) {
$('form', context).delegate('input.form-file', 'change', function() {
$(this).next('input[type="submit"]').mousedown();
});
}
};
})(jQuery);
It will automatically upload all the images on click of upload button using above Jquery.
for more information,look at this link. at http://drupal.org/sandbox/clivelinsell/1587560 .