This event fires when the current package is about to be prepared.
<script type="text/javascript"> function Uploader1_BeforePackageUpload(packageIndex){ //...your code... } </script>
<aur:Uploader ID="Uploader1" runat="server"> <ClientEvents> <aur:ClientEvent EventName="BeforePackageUpload" HandlerName="Uploader1_BeforePackageUpload" /> </ClientEvents> </aur:Uploader>
<script type="text/javascript"> function Uploader1_BeforePackageUpload(packageIndex){ //...your code... } </script>
<?php $Uploader = new Uploader("Uploader1"); //...other params... $Uploader->getClientEvents()->setBeforePackageUpload("Uploader1_BeforePackageUpload"); //...other params... $Uploader->render(); ?>
function Uploader1_BeforePackageUpload(packageIndex){ //...your code... }
$au.uploader({ events: { //...other params... beforePackageUpload: [Uploader1_BeforePackageUpload], //...other params... } })
Type: Number
The zero-based index of the package inside the current upload session.
This event makes sense if the FilesPerPackage property is greater than or equal to 1
; otherwise, this event works equally to the BeforeUpload.
Calling the count() method from this event handler may result in an irrelevant value, since ActiveX/Java Uploader prepares and uploads packages in two different threads.