Ну, так как никто не ответил на это, и я держу пари, что люди сочтут это полезным, вот что я сделал:
jQuery('.btnUploader').each(function (index) {
var uploader1 = new qq.FileUploader({
element: jQuery('.btnUploader')[index], // The HTML element to turn into the uploader
action: getUrl('ControllerUploadHandler', 'Home'), // Action method that will handle the upload
multiple: false, // Single or Mutliple file selection
allowedExtensions: ['png', 'jpeg', 'jpg', 'gif', 'bmp'], // File Type restrictions
sizeLimit: 0, // Max File Size
minSizeLimit: 0, // Min File Size
debug: false, // When true outputs server response to browser console
// Show a preview of the uploaded image
onComplete: function (id, fileName, responseJSON) {
// // Get the preview container
// var $previewContainer = jQuery('#uploader1Preview');
// // Create the preview img element
// var $preview = jQuery('<img />');
// // Add the current time to the end of the preview handler's url to prevent caching by the browser
// $preview.attr('src', getUrl() + 'Content/handlers/previewPhoto.ashx?filename=' + fileName + '&v=' + new Date().getTime());
// // Hide the preview and set it's size
// $preview.css({ display: 'none', width: '90%', height: '200px' });
// // Make sure the preview's container is empty
// $previewContainer.html('');
// // Append the preview to the container
// $previewContainer.append($preview);
// // Fade in the preview
// $preview.fadeIn('slow');
}
});
});
просто вставьте его в каждый, оберните функцию вокруг него, отправьте индексаааа и готово.