ImageUploaderFlash.BeforeUpload Event HTML5/Flash Uploader

Supported technologies: Adobe FlashHTML 5

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

Syntax

ASP.NET
<script type="text/javascript">
function ImageUploaderFlash1_BeforeUpload(){
    //...your code...
}
</script>
<aur:ImageUploaderFlash ID="ImageUploaderFlash1" runat="server">
    <ClientEvents>
        <aur:ClientEvent EventName="BeforeUpload" HandlerName="ImageUploaderFlash1_BeforeUpload" />
    </ClientEvents>
</aur:ImageUploaderFlash>
PHP
<script type="text/javascript">
function ImageUploaderFlash1_BeforeUpload(){
    //...your code...
}
</script>
<?php
    $ImageUploaderFlash = new ImageUploaderFlash("ImageUploaderFlash1");
    //...other params...
    $ImageUploaderFlash->getClientEvents()->setBeforeUpload("ImageUploaderFlash1_BeforeUpload");
    //...other params...
    $ImageUploaderFlash->render();
?>
JavaScript
function ImageUploaderFlash1_BeforeUpload(){
    //...your code...
}
$au.imageUploaderFlash({
    events: {
        //...other params...
        beforeUpload: [ImageUploaderFlash1_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