Created
September 28, 2013 13:57
-
-
Save nfriend21/6742335 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
$(".cloudinary-fileupload") | |
.bind('fileuploadprogress', function(e, data) { | |
console.log('fileuploadprogress') | |
}) | |
.off("cloudinarydone").on("cloudinarydone", function (e, data) { | |
console.log('in it') | |
}) | |
.fileupload({ | |
// Uncomment the following lines to enable client side image resizing and valiation. | |
// Make sure cloudinary/processing is included the js file | |
//disableImageResize: false, | |
//imageMaxWidth: 800, | |
//imageMaxHeight: 600, | |
//acceptFileTypes: /(\.|\/)(gif|jpe?g|png|bmp|ico)$/i, | |
//maxFileSize: 20000000, // 20MB | |
dropZone: "#direct_upload", | |
start: function (e) { | |
$(".status").text("Starting upload..."); | |
}, | |
progress: function (e, data) { | |
ajaxOverlayUploading("Uploading... " + Math.round((data.loaded * 100.0) / data.total) + "%") | |
$(".status").text("Uploading... " + Math.round((data.loaded * 100.0) / data.total) + "%"); | |
}, | |
fail: function (e, data) { | |
$(".status").text("Upload failed"); | |
}, | |
complete: function (e, data) { | |
$('.ajax-overlay-confirmation').html('Processing...'); | |
$('body').addClass('upload-complete'); | |
console.log('done'); | |
} | |
}) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment