Meet us at PRINT 19. Chicago, IL. Oct. 3 - 5.

Uploader.BeforeUpload Event ActiveX/Java Uploader

Supported browsers: Internet ExplorerFirefoxGoogle ChromeSafari

This event fires when the upload is about to be started.

Syntax

ASP.NET
<script type="text/javascript">
function Uploader1_BeforeUpload(){
    //...your code...
}
</script>
<aur:Uploader ID="Uploader1" runat="server">
    <ClientEvents>
        <aur:ClientEvent EventName="BeforeUpload" HandlerName="Uploader1_BeforeUpload" />
    </ClientEvents>
</aur:Uploader>
PHP
<script type="text/javascript">
function Uploader1_BeforeUpload(){
    //...your code...
}
</script>
<?php
    $Uploader = new Uploader("Uploader1");
    //...other params...
    $Uploader->getClientEvents()->setBeforeUpload("Uploader1_BeforeUpload");
    //...other params...
    $Uploader->render();
?>
JavaScript
function Uploader1_BeforeUpload(){
    //...your code...
}
$au.uploader({
    events: {
        //...other params...
        beforeUpload: [Uploader1_BeforeUpload],
        //...other params...
    }
})

Return Value

Type: Boolean

If false (or zero), the upload is cancelled. Otherwise, upload begins immediately after the event handler finishes. This makes the event handler convenient for validating additional data provided by a user.

See Also

Reference

Manual