Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).ready(function () {
- // Multiple files - single input
- $("#multipleFiles").uploadify({
- /*=========================*/
- 'uploader': '<?= $this->config->multiUpload['uploader']; ?>',
- 'script': '<?= $this->config->multiUpload['script']; ?>',
- 'checkScript': '<?= $this->config->multiUpload['checkScript']; ?>',
- 'fileDataName': '<?= $this->config->multiUpload['fileDataName']; ?>',
- 'folder': '<?= $this->config->multiUpload['folder']; ?>',
- 'fileExt' : '<?= $this->config->multiUpload['fileExt']; ?>',
- 'buttonText': '<?= $this->config->multiUpload['buttonText']; ?>',
- 'sizeLimit': <?= $this->config->multiUpload['sizeLimit']; ?>,
- 'simUploadLimit': <?= $this->config->multiUpload['simUploadLimit']; ?>,
- 'cancelImg': '<?= $this->config->multiUpload['cancelImg']; ?>',
- 'displayData': '<?= $this->config->multiUpload['displayData']; ?>',
- 'auto': <?= $this->config->multiUpload['auto']; ?>,
- 'multi': <?= $this->config->multiUpload['multi']; ?>,
- /*=========================*/
- 'scriptData': {'name': 'test'},
- /*=========================*/
- 'onError': function (a, b, c, d) {
- if (d.status == 404)
- alert("Nie można odnaleźć uploadera. Użyj ścieżki względnej do: " + "<?= getcwd() ?>");
- else if (d.type === "HTTP")
- alert("error " + d.type + ": " + d.status);
- else if (d.type === "File Size")
- alert(c.name + " " + d.type + " Limit: " + Math.round(d.info / (1024 * 1024)) + "MB");
- else
- alert("error " + d.type + ": " + d.text);
- },
- /*=========================*/
- 'onComplete': function (event, queueId, fileObj, response, data) {
- alert(response);
- }
- });
- /*=========================*/
- $("#btn1").click(function () {
- $('#multipleFiles').uploadifyUpload();
- });
- /*=========================*/
- $('#name').bind('change', function(){
- $('#multipleFiles').uploadifySettings('scriptData', { 'name' : $(this).val(), 'type' : $(this).val() });
- });
- });
Add Comment
Please, Sign In to add comment