Last active
December 29, 2016 00:33
-
-
Save jecyhw/ea13b13719790bcfd54b5af647d8753d 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
var pluploadOptions = { | |
runtimes : 'html5,flash,silverlight,html4', | |
flash_swf_url : addBasePath('plugin/plupload/Moxie.swf'), | |
silverlight_xap_url : addBasePath('plugin/plupload/Moxie.xap'), | |
multi_selection: false, | |
file_data_name: 'file', | |
multipart_params : { | |
_csrf: token | |
}, | |
filters : { | |
max_file_size : '20mb', | |
mime_types: [ | |
{title : "Image files", extensions : "jpg,gif,png"} | |
] | |
} | |
}; | |
var uploader = new plupload.Uploader($.extend(pluploadOptions, { | |
container: pan.get(0), | |
browse_button: pan.find('button[name="file"]').get(0), | |
url: this.url, | |
init: { | |
PostInit: function () { | |
}, | |
FilesAdded: function (up, files) { | |
}, | |
BeforeUpload: function (up, files) { | |
}, | |
UploadProgress: function (up, file) { | |
}, | |
Error: function (up, err) { | |
}, | |
FileUploaded: function (up, file, result) { | |
} | |
} | |
})); | |
uploader.init(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment