This event fires when the upload is about to be started.
<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>
<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(); ?>
function ImageUploaderFlash1_BeforeUpload(){ //...your code... }
$au.imageUploaderFlash({ events: { //...other params... beforeUpload: [ImageUploaderFlash1_BeforeUpload], //...other params... } })
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.