---
title: "Uploader.BeforeSendRequest Event ActiveX/Java Uploader "
canonical: https://www.aurigma.com/docs/us8/JA_E_Uploader_BeforeSendRequest.htm
product: "Upload Suite 8"
---

# Uploader.BeforeSendRequest Event ActiveX/Java Uploader 

Supported browsers: ![Internet Explorer](https://www.aurigma.com/docs/us8/icons/ie8.png)![Firefox](https://www.aurigma.com/docs/us8/icons/firefox.png)![Google Chrome](https://www.aurigma.com/docs/us8/icons/chrome.png)![Safari](https://www.aurigma.com/docs/us8/icons/safari.png)
 
This event fires when the current POST request is about to be uploaded.

## Syntax
 
```aspx-cs
<script type="text/javascript">
function Uploader1_BeforeSendRequest(){
    //...your code...
}
</script>
```

```
<aur:Uploader ID="Uploader1" runat="server">
    <ClientEvents>
        <aur:ClientEvent EventName="BeforeSendRequest" HandlerName="Uploader1_BeforeSendRequest" />
    </ClientEvents>
</aur:Uploader>
```
 
```
<script type="text/javascript">
function Uploader1_BeforeSendRequest(){
    //...your code...
}
</script>
```

```
<?php
    $Uploader = new Uploader("Uploader1");
    //...other params...
    $Uploader->getClientEvents()->setBeforeSendRequest("Uploader1_BeforeSendRequest");
    //...other params...
    $Uploader->render();
?>
```
 
```
function Uploader1_BeforeSendRequest(){
    //...your code...
}
```

```
$au.uploader({
    events: {
        //...other params...
        beforeSendRequest: [Uploader1_BeforeSendRequest],
        //...other params...
    }
})
```

## Remarks
 
Depending on the upload settings (UploadSettings[UploadSettings (ASP.NET)](https://www.aurigma.com/docs/us8/JA_T_Aurigma_ImageUploader_UploadSettings.htm.md)[UploadSettings (PHP)](https://www.aurigma.com/docs/us8/JA_T_P_UploadSettings.htm.md)[uploadSettings (JavaScript)](https://www.aurigma.com/docs/us8/JA_T_J_$au_uploadSettings.htm.md) configuration), the currently uploaded POST request can contain:
 
- a whole upload session, if FilesPerPackage[FilesPerPackage (ASP.NET)](https://www.aurigma.com/docs/us8/JA_P_Aurigma_ImageUploader_UploadSettings_FilesPerPackage.htm.md)[FilesPerPackage (PHP)](https://www.aurigma.com/docs/us8/JA_P_P_UploadSettings_FilesPerPackage.htm.md)[filesPerPackage (JavaScript)](https://www.aurigma.com/docs/us8/JA_P_J_$au_uploadSettings_filesPerPackage.htm.md) is `0` and ChunkSize[ChunkSize (ASP.NET)](https://www.aurigma.com/docs/us8/JA_P_Aurigma_ImageUploader_UploadSettings_ChunkSize.htm.md)[ChunkSize (PHP)](https://www.aurigma.com/docs/us8/JA_P_P_UploadSettings_ChunkSize.htm.md)[chunkSize (JavaScript)](https://www.aurigma.com/docs/us8/JA_P_J_$au_uploadSettings_chunkSize.htm.md) is `0`;
- a package, if **FilesPerPackage** is greater than or equal to `1` and **ChunkSize** is `0`;
- a chunk, if **FilesPerPackage** is `1`, **ChunkSize** is greater than `0`, and a size of the currently uploaded file exceeds the **ChunkSize** value.

## See Also
 
### Reference
 
- BeforeSendRequest Property[BeforeSendRequest (PHP)](https://www.aurigma.com/docs/us8/JA_P_P_ClientEvents_BeforeSendRequest.htm.md)[beforeSendRequest (JavaScript)](https://www.aurigma.com/docs/us8/JA_P_J_$au_events_beforeSendRequest.htm.md)

### Manual
 
- [Sending All Files at Once or in Several Parts in ActiveX/Java Uploader](https://www.aurigma.com/docs/us8/sending-all-files-at-once-or-in-several-parts.htm.md)
- [Using Events](https://www.aurigma.com/docs/us8/using-javascript-api.htm.md)
