Created
November 23, 2012 17:34
-
-
Save mrship/4136589 to your computer and use it in GitHub Desktop.
FilePicker Q2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
filepicker.makeDropPane($('#mfl-fp')[0], { | |
maxsize: 1048576, | |
multiple: true, | |
dragEnter: function() { | |
dragDropPane.addClass('drag'); | |
$('#mfl-fp-message').text('Files should be less than 1Mb in size.'); | |
}, | |
dragLeave: function() { | |
dragDropPane.removeClass('drag'); | |
}, | |
onSuccess: function(fpFiles) { | |
$.each(fpFiles, function(index, fileInfo) { | |
return mfl.addUploadedFileImage(fileInfo); | |
}); | |
$('#mfl-fp-message-image').addClass('hidden'); | |
$('#mfl-fp-message').text(completeMessage); | |
enableAfterUpload($(buttonFinderText)); | |
}, | |
onError: function(type, message) { | |
$('#mfl-fp-message-image').addClass('hidden'); | |
$('#mfl-fp-message').text(errorMessage); | |
enableAfterUpload($(buttonFinderText)); | |
}, | |
onProgress: function(fpPercentage) { | |
$('#mfl-fp-message').text('Uploading: ' + fpPercentage + '%'); | |
}, | |
onStart: function(files) { | |
disableBeforeUpload($(buttonFinderText)); | |
$('#mfl-fp-message-image').removeClass('hidden'); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment