Implementation Approach
The Web Control is created by including the script and stylesheet on the page, specifying the element where the control will be rendered, and calling exabyter.create(). A single control can handle both uploads and downloads, and transferMode can restrict it to a specific purpose.
Overview
What Is Web Embedding
This approach renders a file transfer control in a specific page element (for example, <div id="fileControl">) and controls transfers through the control object returned by exabyter.create(options). The control splits files into slices and transfers them in parallel across multiple sessions, enabling reliable handling of files ranging from several GB to tens of GB that are difficult to transfer with standard browser uploads.
Common Setup
Include Resources — Page <head>to and the does.
<link rel="stylesheet" type="text/css" href="/exabyter/exabyter.css">
<script src="/exabyter/exabyter.js"></script>
Container Element — controlis the does.
<div id="fileControl"></div>
Create the Control — exabyter.create()to Option the control is returnis performed.
<script>
var control = exabyter.create({
setElementID: '#fileControl',
setViewType: 'ListView',
transferMode: 'both',
setUploadURL: '/exabyter/example/upload.jsp'
});
</script>
Server Endpoints — Upload Receiveand Download is Server is does.
| Purpose | Endpoint | Option |
|---|---|---|
| Upload Receive | upload.jsp | setUploadURL / uploadURL |
| Download | download.jsp | Download Listof downloadURL |
| Transfer Monitor (Optional) | transferInfo.jsp | monitorURL |
Core APIs
| Purpose | Call |
|---|---|
| Create the Control | exabyter.create(options) |
| File Selection Dialog | control.openFileDialog() |
| Folder Selection Dialog | control.directoryDialog() |
| Upload Start | control.upload() |
| Download List specification | control.setDownloadList(items) |
| Download Start | control.download() |
Basic Flow
- Pageto
exabyter.css·exabyter.js - controlthe Container Element
exabyter.create(options)Create the Control →control- (Upload)
control.openFileDialog()File Attach →control.upload() - (Download)
control.setDownloadList(items)List specification →control.download()
Choose an Implementation Approach
Description
A single control supports both uploads and downloads. Use transferMode to define its purpose and setTransferStart to choose whether transfers start automatically after files are attached or a list is set, or start manually, such as by clicking a button.
Options
| Option | Value | Description |
|---|---|---|
transferMode | "both" · "upload" · "download" | controlis Process Transfer Direction |
setTransferStart.upload | "auto" · "manual" | File Attach after Upload Automatic/Manual Start |
setTransferStart.download | "auto" · "manual" | List specification after Download Automatic/Manual Start |
setViewType | "ListView" etc. | control View |
Example
<script>
var control = exabyter.create({
setElementID: '#fileControl',
setViewType: 'ListView',
transferMode: 'both',
setTransferStart: {
upload: 'auto', // Attach immediately Upload
download: 'manual' // List specification after to Start
},
setUploadURL: '/exabyter/example/upload.jsp'
});
</script>
Process
transferModeUpload ·Download ·DirectionsetTransferStartDirection Automatic/Manual Start Policy- Manual(
manual)is Pageof fromcontrol.upload()·control.download()the Call
Upload UI
Description
Uploads begin with control.upload() after files or folders are attached. Attachments can be added through a file picker, folder picker, or drop zone (drag and drop).
Use API·Option
| Target | Call·Option | Description |
|---|---|---|
| File Attach | control.openFileDialog() | File Selection Dialog |
| Folder Attach | control.directoryDialog() | Folder Selection Dialog |
| drop zone | enableDropZone: true | Attach Allow |
| Folder Add | addFolder: true | Folder unit Attach Allow |
| Upload Start | control.upload() | Attach Item Transfer Start |
Example
<div id="fileControl"></div>
<button onclick="control.openFileDialog()">File Select</button>
<button onclick="control.directoryDialog()">Folder Select</button>
<button onclick="control.upload()">Upload</button>
<script>
var control = exabyter.create({
setElementID: '#fileControl',
transferMode: 'upload',
setTransferStart: { upload: 'manual' },
setUploadURL: '/exabyter/example/upload.jsp',
enableDropZone: true,
addFolder: true
});
</script>
Process
- Create the Control(
transferMode: 'upload') openFileDialog()·directoryDialog()or drop zoneto Item Attachcontrol.upload()Call → Slice ·Parallel SessiontosetUploadURLto Transfer
Download UI
Description
Downloads begin with control.download() after the target list is set with control.setDownloadList(). Each item includes the server download endpoint (downloadURL), a display name, and a size.
Download Item Fields
| Field | Type | Description |
|---|---|---|
downloadURL | string | Download Endpoint(download.jsp?fileName=...) |
displayFileName | string | Listto Display File name |
fileSize | number | File Size(is) |
isFolder | boolean | Folder whether |
Example
<button onclick="control.download()">Download</button>
<script>
control.setDownloadList([
{
downloadURL: '/exabyter/example/download.jsp?fileName=500MB.dat',
displayFileName: '500MB.dat',
fileSize: 524288000,
isFolder: false
}
]);
</script>
Process
- Create the Control(
transferMode: 'download'or'both') setDownloadList([...])Target List specificationcontrol.download()Call → ItemthedownloadURLfrom Slice Parallel Receive
Paths and Policies
This section covers where files are actually stored and retrieved and the policies that determine which files and how much data can be received. Storage paths are defined by server scripts, while file type, count, and size limits are configured through control options.
Storage Paths
Description
The upload storage path and download source path are defined by server scripts. For uploads, pass the storage directory to the ExabyterUpload constructor; for downloads, specify the storage root in the streaming script and read the file from it. Because these paths exist only on the server, they are not exposed to the client.
Server Configuration Points
| Target | Location | Value |
|---|---|---|
| Upload Storage Directory | upload.jsp — new ExabyterUpload(request, response, maxPostSize, directory) | : /storage/exabyter |
| Download Source Root | download.jsp — filePath | : /storage/exabyter/ |
| Per-Transfer Subfolder (Optional) | uploader.setDirectory(directory + "\\" + _transferId) | _transferId Based on |
Upload Storage Path (JSP)
<%@ page import="com.innorix.transfer.ExabyterUpload" %>
<%
if (request.getMethod().equals("POST")) {
String directory = "/storage/exabyter"; // Storage root
int maxPostSize = 2147482624; // Maximum request size (bytes)
ExabyterUpload uploader = new ExabyterUpload(request, response, maxPostSize, directory);
// Transfer unit Folderthe to:
// uploader.setDirectory(directory + "\\" + uploader.getParameter("_transferId"));
String retval = uploader.run(); // Process slice storage
uploader = null;
}
%>
Download Source Path (JSP)
<%
// Storage root. is also/ both "/" Use is
// also - C:/storage/path/data
// - /storage/path/data
String filePath = "/storage/exabyter/";
String fileName = request.getParameter("fileName");
File file = new File(filePath + fileName);
%>
Process
- Upload:
ExabyterUploadCreate when Storage root(directory) specification →run()is Slicethe corresponding Pathto Record - (Select)
setDirectory()_transferIdetc. Transfer unit Folder - Download: of
filePath(Storage root) + RequestfileNameto Source File Check after
File Policies
Description
Use control options to limit the type, number, and size of files that can be received. You can specify allowed or blocked extensions, the number of files, and per-file and total size limits, while the server also limits the request body size with maxPostSize.
Options
| Option | Type | Description |
|---|---|---|
allowType | string[] | Allowed extensions List (: ["zip","pdf"]) |
denyType | string[] | Blocked extensions List (: ["exe","bat"]) |
maxFileCount | number | Maximum number of attached files |
maxFileSize | number | Maximum individual file size (bytes) |
maxTotalSize | number | Maximum total size (bytes) |
setAttachDuplicate | boolean | Whether duplicate attachments of the same file are allowed |
Example
<script>
var control = exabyter.create({
setElementID: '#fileControl',
setUploadURL: '/exabyter/example/upload.jsp',
allowType: ['zip', 'pdf', 'xlsx'], // Allowed extensions
denyType: null, // Blocked extensions(Allowand )
maxFileCount: 100,
maxFileSize: 21474836480, // 20 GB
maxTotalSize: 107374182400 // 100 GB
});
</script>
Server side Request Size Limitis Upload from specificationdoes.
int maxPostSize = 2147482624; // Serveris Allowis Maximum Request Size(is)
ExabyterUpload uploader = new ExabyterUpload(request, response, maxPostSize, directory);
Process
allowTypeordenyTypePolicy specificationmaxFileCount·maxFileSize·maxTotalSizequantity·capacity specification- Server
maxPostSizeRequest Sizethe is Limit
Access Control
Description
The control sends the page session cookie with transfer requests, and server scripts identify the request origin through session and custom parameters. You can send a user identifier or arbitrary values through postData and custom and validate authorization on the server.
Options and Parameters
| Option | Description |
|---|---|
cookie | Requestto (Default document.cookie) |
postData | Upload Requestto together POST is |
custom | |
userid · UserPart | Upload when User identification value |
Upload is is / :
| Server | Description |
|---|---|
type | Custom POST parameter 1 |
part | Custom POST parameter 2 |
el | Control element ID |
_transferId | Transfer identifier |
Example
Client — User identification value :
<script>
var control = exabyter.create({
setElementID: '#fileControl',
setUploadURL: '/exabyter/example/upload.jsp',
userid: 'user-1024',
postData: { type: 'report', part: 'q3' }
});
</script>
Server — Value Check after Authorization Verification:
<%
String userType = uploader.getParameter("type"); // "report"
String part = uploader.getParameter("part"); // "q3"
String el = uploader.getParameter("el");
// session.getId(), userType etc.to Access Control Verification
%>
Process
postData·custom·useridRequest origin· Valuethe Transfer- controlis Session and together Server Request
- Serveris Session· Authorizationthe Check, required when Error Block
Expiration and Security
Description
Security is strengthened through encrypted transfer data and server-side access blocking. The control provides options for encrypting transfer data and metadata, while the server can expire or block specific requests with custom errors. Session-based access is maintained through CORS credential headers.
Options and APIs
| Target | Option·API | Description |
|---|---|---|
| Transfer is Encryption | useEncrypt: true | Transfer file data with encryption |
| is Encryption | useEncryptMeta: true | Encrypt metadata such as file names |
| Presigned URL Use | isPresignedUrl: true | Presigned URL |
| Request Block(Server) | uploader.showCustomError(code, msg, detail, bool) | Conditional expiration or rejection |
| Download Not found(Server) | InnorixCustomError.set(code, msg, detail, bool) | Custom errors such as 404 |
Example
Client — Encryption Transfer:
<script>
var control = exabyter.create({
setElementID: '#fileControl',
setUploadURL: '/exabyter/example/upload.jsp',
useEncrypt: true,
useEncryptMeta: true
});
</script>
Server — Conditionto according to Upload Reject(Expired Process ):
<%
if (uploader.getParameter("_action").equals("attachFileCompleted")
&& !isAuthorized(session)) {
uploader.showCustomError("1500", "expired", "Authorizationis Expired.", false);
return;
}
%>
Server — Download Targetis the when:
<%
if (!file.exists()) {
response.setStatus(404);
InnorixCustomError customError = new InnorixCustomError(response);
customError.set("1016", "not Found", "file don't exist", false);
customError.run();
return;
}
%>
CORS (Upload·Download common):
response.setHeader("Access-Control-Allow-Origin", request.getHeader("Origin"));
response.setHeader("Access-Control-Allow-Credentials", "true");
Process
- Transfer Securityis if necessary
useEncrypt·useEncryptMetaEncryption Transfer - Serveris Session·Authorizationthe Check, Expired·Reject Conditionfrom Error return
- CORS Cross-originfromalso Session Access
Applying to a Web Page
This section covers the complete process of adding the control to an actual page: including resources, creating the control, connecting upload and download servers, and configuring the UI, including the view and buttons.
Create the Control
Description
exabyter.create(options) is the entry point for creating the control. Pass the target element (setElementID), server endpoints, and transfer policies as options to receive a control instance.
Key Creation Options
| Option | Description |
|---|---|
setElementID | controlthe Select (: '#fileControl') |
setViewType | View (: 'ListView') |
transferMode | "both" · "upload" · "download" |
setUploadURL | Upload Receive Endpoint |
monitorURL | Transfer Endpoint(Select) |
controlLang | control UI Language (: 'en', 'ko') |
charset | Character set (Default "UTF-8") |
Minimal Configuration Example
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="/exabyter/exabyter.css">
<script src="/exabyter/exabyter.js"></script>
</head>
<body>
<div id="fileControl"></div>
<script>
var control = exabyter.create({
setElementID: '#fileControl',
setViewType: 'ListView',
transferMode: 'both',
setUploadURL: '/exabyter/example/upload.jsp',
monitorURL: '/exabyter/example/transferInfo.jsp',
controlLang: 'en'
});
</script>
</body>
</html>
Process
exabyter.css·exabyter.js- Target Container Element
exabyter.create(options)Call →control
Upload Integration
Description
Use setUploadURL to connect the server endpoint that receives upload requests and stores slices. The server processes requests with ExabyterUpload, and each request stage is identified by the _action flag.
Upload Request _action Flags
| Value | Stage |
|---|---|
speedCheck | Measure transfer speed |
getServerInfo | Check server information |
getFileInfo | Check file information |
attachFile | Transfer file slices |
attachFileCompleted | File transfer complete |
main Request : _orig_filename(Source File name), _new_filename(Storage File name), _filesize, _start_offset · _end_offset(Slice Range), _filepath, _transferId.
Client Integration
<script>
var control = exabyter.create({
setElementID: '#fileControl',
transferMode: 'upload',
setUploadURL: '/exabyter/example/upload.jsp' // ← Upload Server Connect
});
</script>
Server (upload.jsp)
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ page import="com.innorix.transfer.ExabyterUpload" %>
<%
// CORS is(OPTIONS)is POST whenonly Process
if (request.getMethod().equals("POST")) {
String directory = "/storage/exabyter";
int maxPostSize = 2147482624;
ExabyterUpload uploader = new ExabyterUpload(request, response, maxPostSize, directory);
String action = uploader.getParameter("_action"); // Stage
uploader.run(); // Process slice storage
if ("attachFileCompleted".equals(action)) {
uploader.setCustomValue("_fileSize", uploader.getParameter("_filesize"));
}
uploader = null;
}
// CORS
response.setHeader("Access-Control-Allow-Origin", request.getHeader("Origin"));
response.setHeader("Access-Control-Allow-Credentials", "true");
response.setHeader("Access-Control-Allow-Methods", "POST, OPTIONS");
response.setHeader("Access-Control-Allow-Headers",
"Authorization,DNT,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type, html5");
%>
Process
- Client
setUploadURLthe Server Path specification - controlis Filethe Slice
attachFileRequestthe Transfer - Server
uploader.run()is Slicethe Storage Pathsto Record,attachFileCompleted - OPTIONS is the CORS return
Download Integration
Description
Specify download targets with setDownloadList(), and use each item's downloadURL to point to the server streaming endpoint. The server streams only the requested range (_StartOffset · _EndOffset).
Download Stream Request Parameters
| Description | |
|---|---|
fileName | Download File name |
_StartOffset · _EndOffset | Slice Range(range Request) |
_IsSliceTransfer | Slice Transfer whether |
_OrigStartOffset | Source Slice Start |
_Integrity | Integrity(MD5) Request whether |
_Action | DownloadStart · DownloadComplete Stage |
Client Integration
<script>
control.setDownloadList([
{
downloadURL: '/exabyter/example/download.jsp?fileName=500MB.dat',
displayFileName: '500MB.dat',
fileSize: 524288000,
isFolder: false
}
]);
control.download();
</script>
Server (download.jsp, )
<%@ page contentType="application/octet-stream" trimDirectiveWhitespaces="true" %>
<%@ page import="com.innorix.transfer.InnorixCustomError" %>
<%@ page import="java.io.*" %>
<%@ page import="java.net.URLEncoder" %>
<%
// is is JSP to also the .
out.clear();
out = pageContext.pushBody();
String storageRoot = "/storage/exabyter/"; // Storage root ( Path )
String fileName = request.getParameter("fileName");
// required when fileName Path is(../) Verificationthe Add.
File file = new File(storageRoot, fileName);
if (!file.exists()) {
response.setStatus(404);
InnorixCustomError customError = new InnorixCustomError(response);
customError.set("1016", "not Found", "file don't exist", false);
customError.run();
return;
}
long fileLength = file.length();
long startOffset = request.getParameter("_StartOffset") == null
? 0 : Long.parseLong(request.getParameter("_StartOffset"));
long endOffset = request.getParameter("_EndOffset") == null
? fileLength - 1 : Long.parseLong(request.getParameter("_EndOffset"));
long contentLength = endOffset - startOffset + 1;
// etc. ASCII File name
String encodedName = URLEncoder.encode(fileName, "UTF-8").replace("+", "%20");
response.setHeader("Accept-Ranges", "bytes");
response.setHeader("Content-Disposition", "attachment; filename*=UTF-8''" + encodedName);
response.setHeader("Content-Length", String.valueOf(contentLength));
response.setHeader("Access-Control-Allow-Origin", request.getHeader("Origin"));
response.setHeader("Access-Control-Allow-Credentials", "true");
RandomAccessFile raf = null;
OutputStream os = null;
try {
raf = new RandomAccessFile(file, "r");
raf.seek(startOffset); // Request Rangeto is
os = response.getOutputStream();
byte[] buf = new byte[8192];
while (contentLength > 0) {
int read = raf.read(buf, 0, (int) Math.min(buf.length, contentLength));
if (read == -1) break;
os.write(buf, 0, read);
contentLength -= read;
}
os.flush();
} finally {
if (raf != null) raf.close();
if (os != null) os.close();
}
%>
Process
setDownloadList([...])TargetanddownloadURLspecificationcontrol.download()Call → controlis Range(_StartOffset·_EndOffset) Parallel Request- Serveris
Accept-Ranges·Content-Lengthcorresponding Rangeonly - is Fileis 404 + Error Response
UI Configuration
Description
Configure the control's view, buttons, and additional UI through options. You can enable or disable the drop zone, transfer window, QR code, progress graph, and more, and connect transfer and attachment buttons on the page to control methods.
Options
| Option | Value | Description |
|---|---|---|
setViewType | "ListView" etc. | List View |
enableDropZone | boolean | |
showTransferWindow | boolean | Transfer Show transfer window |
showGraph / useSmoothGraph | boolean | Show progress graph |
showQrCode | boolean | QR Display |
showTransferStatusIcon | boolean | Show status icon |
hideClientPath | boolean | Client Path |
transferWindowTitle | string | Transfer Window |
boxWidth · boxHeight | number | control Size |
Example
<div id="fileControl"></div>
<div style="margin-top: 20px;">
<button onclick="control.openFileDialog()">File Select</button>
<button onclick="control.directoryDialog()">Folder Select</button>
<button onclick="control.upload()">Upload</button>
<button onclick="control.download()">Download</button>
</div>
<script>
var control = exabyter.create({
setElementID: '#fileControl',
setViewType: 'ListView',
transferMode: 'both',
setUploadURL: '/exabyter/example/upload.jsp',
enableDropZone: true,
showTransferWindow: true,
showQrCode: true,
hideClientPath: true,
transferWindowTitle: 'Exabyter'
});
</script>
Process
setViewTypeand Display Optionto control- Page to
openFileDialog()·directoryDialog()·upload()·download()Connect - required when
boxWidth·boxHeightSize,transferWindowTitleWindow adjust
Status and Results
This section explains how to display transfer progress and handle completion and failure results through callbacks. The control renders its own progress UI and notifies key stages through event callbacks.
Progress Status
Description
Transfer progress and speed are displayed in the control's transfer window and graph. Display elements can be enabled or disabled through options, and notifyReadyEvent indicates when the control is ready.
Options and Callbacks
| Option·Callback | Description |
|---|---|
showTransferWindow | Show transfer window |
showGraph / alwaysShowTransferGraph | Show progress graph |
useSmoothGraph | Smooth graph rendering |
showTransferStatusIcon | Show status icon |
notifyReadyEvent | Control initialization completion callback |
Example
<script>
var control = exabyter.create({
setElementID: '#fileControl',
setUploadURL: '/exabyter/example/upload.jsp',
showTransferWindow: true,
showGraph: true,
useSmoothGraph: true,
notifyReadyEvent: function () {
// control Ready Complete — etc.
console.log('control ready');
}
});
</script>
Process
- Progress Display Option(
showTransferWindow·showGraphetc.)to UI notifyReadyEventfrom Ready Complete Check after Allow- Transfer controlis Progress·Speedthe Automatic Refresh
Completion Results
Description
When uploads or downloads finish, uploadCompletedEvent and downloadCompletedEvent are called respectively. Use the result passed to the callback to identify completed files and transfer IDs and run follow-up logic such as recording the transfer or refreshing the UI.
Completion Callbacks
| Callback | when |
|---|---|
uploadCompletedEvent | All Uploads Complete |
downloadCompletedEvent | All Downloads Complete |
Example
<script>
var control = exabyter.create({
setElementID: '#fileControl',
setUploadURL: '/exabyter/example/upload.jsp',
uploadCompletedEvent: function (result) {
// Upload Complete after Process (: Serverto etc., List Refresh)
console.log('upload completed', result);
},
downloadCompletedEvent: function (result) {
console.log('download completed', result);
}
});
</script>
Serveris Complete Stagefrom Valuethe Resultto can.
<%
if ("attachFileCompleted".equals(uploader.getParameter("_action"))) {
uploader.setCustomValue("_fileSize", uploader.getParameter("_filesize"));
}
%>
Process
- Create Optionto
uploadCompletedEvent·downloadCompletedEventetc. - Transfer Complete when Callback Result Receive
- Serveris
setCustomValueValuethe after Process
Result Events
Description
The control emits start, progress, completion, cancellation, and error events throughout the transfer lifecycle. In addition to the completion callbacks above, you can handle start, progress, cancellation, and error events for each direction.
Event List
| Direction | Start | Progress | Complete | Cancel | Error |
|---|---|---|---|---|---|
| Upload | uploadStart | uploadProgress | uploadComplete | uploadCancel | uploadError |
| Download | downloadStart | downloadProgress | downloadComplete | downloadCancel | downloadError |
| Transfer(common) | — | — | transferComplete | transferCancel | transferError |
main Complete·Ready whenis Create Optionof Callback(uploadCompletedEvent · downloadCompletedEvent · notifyReadyEvent)to Connectdoes.
Example
<script>
var control = exabyter.create({
setElementID: '#fileControl',
setUploadURL: '/exabyter/example/upload.jsp',
notifyReadyEvent: function () { /* Ready Complete */ },
uploadCompletedEvent: function (result) { /* Upload Complete */ },
downloadCompletedEvent: function (result) { /* Download Complete */ }
});
</script>
Process
- Ready·Complete whenis Create Option Callbackto Connect
- Start·Progress·Cancel whenis if necessary corresponding Direction Eventthe together Process
- Event is Result ·Record Refresh
Error Handling
Description
Transfer failures are reported through upload and download error events, and the server returns custom error codes describing the cause. The control recovers from temporary errors according to its retry and automatic recovery policies.
Options and APIs
| Target | Option·API | Description |
|---|---|---|
| Upload Error Event | uploadError | Upload Failure |
| Download Error Event | downloadError | Download Failure |
| Retry | retryCount (Default 5) | Failure when Retry |
| Retry | retryDelay (Default 3) | Retry when |
| Maximum Error Allow | maxErrorCount | and when Transfer Interrupted |
| Server Custom Error | showCustomError(code, msg, detail, bool) · InnorixCustomError.set(...) | Failure |
Example
Server — Upload Condition Error:
<%
if (invalidRequest) {
uploader.showCustomError("1003", "invalid request", "Requestis .", false);
return;
}
%>
Server — Download File Not found(404):
<%
if (!file.exists()) {
response.setStatus(404);
InnorixCustomError customError = new InnorixCustomError(response);
customError.set("1016", "not Found", "file don't exist", false);
customError.run();
return;
}
%>
Client — Retry Policy:
<script>
var control = exabyter.create({
setElementID: '#fileControl',
setUploadURL: '/exabyter/example/upload.jsp',
retryCount: 5,
retryDelay: 3,
maxErrorCount: 9999
});
</script>
Process
retryCount·retryDelayTemporary Errorof Automatic Retry Policy Configure- Serveris Failure Conditionfrom Error the return
- Retryalso Error Event ,
maxErrorCountand when Interrupted
Large-File Transfer
This section covers slice splitting and parallel sessions, interrupted-transfer recovery, automatic retries, and integrity verification for reliably transferring files ranging from several GB to tens of GB. Most of these features are enabled and configured through options.
Large-File Transfer
Description
The control splits files into slices (chunks) and transfers them in parallel across multiple sessions, increasing throughput in high-speed mode. Tune slice size and session count for your network environment.
Options
| Option | Default | Description |
|---|---|---|
sliceSize | 2097152 (2 MB) | Slice Size(is) |
uploadSliceSize · downloadSliceSize | 0(=sliceSize) | Direction Slice Size |
sessionCount | 15 | Parallel Session |
uploadSessionCount · downloadSessionCount | 0(=sessionCount) | Direction Session |
highSpeedMode / isHighSpeed | true | High-speed Transfer |
largeAccelerator | false | Large-file is |
Serveris Upload Request Sizethe maxPostSize Allow does.
Example
<script>
var control = exabyter.create({
setElementID: '#fileControl',
setUploadURL: '/exabyter/example/upload.jsp',
isHighSpeed: true,
sliceSize: 2097152, // 2 MB Slice
uploadSessionCount: 16, // Parallel Session 16
downloadSessionCount: 16
});
</script>
Process
- Filethe
sliceSizeunit Slice sessionCount(Direction Session )only Parallel Slice Transfer- High-speed ·is Optionto Process , Server
maxPostSizeRequest Size
Interrupted Transfer Recovery
Description
Even if a transfer is interrupted by a network disconnection or closing the window, it can resume from the point after the slices already stored. Uploads resume based on the slice offset (_start_offset), while downloads resume the remaining range through range requests (Accept-Ranges). Duplicate-handling policies determine whether to resume, overwrite, and so on.
Options
| Option | Value | Description |
|---|---|---|
resumeType | overwrite · relay · nosend · numbering · confirm | Upload |
uploadDuplicate | boolean / Policy | Upload Duplicate Process |
downloadDuplicate | resume etc. | Download Duplicate·is Process |
resumeCondition | boolean | Condition Use |
attachIncompleteFiles | boolean | Reattach Incomplete Files |
autoRecovery | boolean | Automatic Recovery |
enableAutoReattach | boolean | Automatic Reattachment (Reconnection) |
Example
<script>
var control = exabyter.create({
setElementID: '#fileControl',
setUploadURL: '/exabyter/example/upload.jsp',
resumeType: 'relay', // Storage point is
downloadDuplicate: 'resume',
autoRecovery: true,
attachIncompleteFiles: true,
enableAutoReattach: true
});
</script>
Download Serveris range Requestthe must support does(Slice Rangeonly ).
<%
response.setHeader("Accept-Ranges", "bytes");
long contentLength = endOffset - startOffset + 1; // Remaining Range
response.setHeader("Content-Length", String.valueOf(contentLength));
if (startOffset != 0) in.skip(startOffset); // Storage point isafter
%>
Process
- Transfer Slice Complete pointthe
- Interrupted after when last Complete Slice isafter Transfer(
_start_offset/ range Request) resumeType·downloadDuplicatePolicyto is·overwrite
Automatic Retry
Description
Slices affected by temporary network errors are automatically retried according to the configured count and interval. If a retry succeeds, the transfer continues; if the allowed error count is exceeded, the transfer stops.
Options
| Option | Default | Description |
|---|---|---|
retryCount | 5 | Slice Failure when Retry |
retryDelay | 3 | Retry () |
maxErrorCount | 9999 | Cumulative Allow Error |
autoRecovery | true | Automatic Recovery Use |
timeout.minSeconds | 60 | Minimum () |
timeout.bytes / timeout.seconds | 0 | is calculation |
Example
<script>
var control = exabyter.create({
setElementID: '#fileControl',
setUploadURL: '/exabyter/example/upload.jsp',
retryCount: 5,
retryDelay: 3,
maxErrorCount: 9999,
autoRecovery: true,
timeout: { minSeconds: 60, bytes: 0, seconds: 0 }
});
</script>
Process
- Slice Transfer Failure when
retryDelaytoretryCountonly Retry - Retry when Transfer ,
timeoutBased onto Response - Cumulative Erroris
maxErrorCountthe if exceeded Transfer Interrupted·Error
Integrity Verification
Description
After transfer, slice-level hashes verify that the file arrived without corruption. When download integrity verification is enabled, the control requests an MD5 for each range from the server, and the server returns the MD5 for the corresponding slice for comparison.
Options and APIs
| Target | Option·API | Description |
|---|---|---|
| Download Integrity | downloadIntegrity: true | Download Integrity Verification Use |
| Verification | setVerification | 'disable' etc. Verification |
| Integrity Request (Server Parameter) | _Integrity=true | MD5 Request |
| Slice MD5 (Server) | Integrity.getMD5FromFileSlice(path, start, end) | Range MD5 calculation |
Example
Client — Integrity Verification Use:
<script>
var control = exabyter.create({
setElementID: '#fileControl',
setUploadURL: '/exabyter/example/upload.jsp',
downloadIntegrity: true,
setVerification: 'enable'
});
</script>
Server — Integrity Request when Slice MD5 return:
<%@ page import="com.innorix.integrity.Integrity" %>
<%
if ("true".equalsIgnoreCase(request.getParameter("_Integrity"))) {
long start = Long.parseLong(request.getParameter("_StartOffset"));
long end = Long.parseLong(request.getParameter("_EndOffset"));
Integrity integrity = new Integrity();
String md5 = integrity.getMD5FromFileSlice(filePath + fileName, start, end);
response.setStatus(200);
response.getWriter().write(md5);
response.getWriter().flush();
response.getWriter().close();
return;
}
%>
Process
downloadIntegrity·setVerificationto Verification Use- controlis Range
_Integrity=trueRequestto Server MD5 - Serveris
getMD5FromFileSlicecalculation MD5and Receive Slicethe compare corruption whether