// Return an empty string to signify success echo ''; exit; } require_once '../include/header.php'; ?> <div class="configuration k-widget k-header" style="width: 300px"> <span class="infoHead">Information</span> <p> This example shows how to handle events triggered by kendoUpload. </p> </div> <div style="width:45%"> <?php $upload = new \Kendo\UI\Upload('files[]'); $upload->async(array('saveUrl' => 'async.php?type=save', 'removeUrl' => 'async.php?type=remove', 'autoUpload' => true))->select('onSelect')->upload('onUpload')->success('onSuccess')->error('onError')->complete('onComplete')->remove('onRemove')->progress('onProgress'); echo $upload->render(); ?> </div> <script> function onSelect(e) { kendoConsole.log("Select :: " + getFileInfo(e)); } function onUpload(e) { kendoConsole.log("Upload :: " + getFileInfo(e)); } function onSuccess(e) { kendoConsole.log("Success (" + e.operation + ") :: " + getFileInfo(e)); }
*/ } } // Return an empty string to signify success echo ''; exit; } require_once '../include/header.php'; ?> <div class="configuration k-widget k-header" style="width: 300px"> <span class="infoHead">Information</span> <p> The Upload is able to upload files out-of-band using the HTML5 File API with fallback for legacy browsers. </p> <p> You need to configure save action that will receive the uploaded files. An optional remove action is also available. </p> </div> <div style="width:45%"> <?php $upload = new \Kendo\UI\Upload('files[]'); $upload->async(array('saveUrl' => 'async.php?type=save', 'removeUrl' => 'async.php?type=remove', 'autoUpload' => true, 'removeField' => 'fileNames[]')); echo $upload->render(); ?> </div> <?php require_once '../include/footer.php';