There are number of upload modes in ActiveX/Java Uploader. This topic provides the best practices along with number of the most common configurations, that allows you to configure uploader efficiently. //Explain that this topic is about efficient upload, so no converters are considered. The following rules are the key practices in order to make upload process more efficient:
For more information about uploader modes, including packages, chunks, and parallel upload, see the Sending All Files at Once or in Several Parts topic.
Also this topic provides configurations for the most common upload tasks:
ASP.NET/PHP | pictures | documents | large files | mixed files |
---|---|---|---|---|
usual upload | 5 files per package | 10 files per package | 1 file per package | 3 files per package |
10Mb chunks | 10Mb chunks | |||
code snippet | code snippet | code snippet | code snippet | |
fast upload | 5 files per package | 10 files per package | 1 file per package | 3 files per package |
10Mb chunks | 10Mb chunks | |||
4 parallel connections | 4 parallel connections | 4 parallel connections | 4 parallel connections | |
code snippet | code snippet | code snippet | code snippet | |
fail-safe upload | Other platforms | pictures | documents | large files | mixed files |
usual upload | 5 files per package | 10 files per package | 1 file per package | 3 files per package |
code snippet | code snippet | code snippet | code snippet | |
fast upload | 5 files per package | 10 files per package | 1 file per package | 3 files per package |
4 parallel connections | 4 parallel connections | 4 parallel connections | 4 parallel connections | |
code snippet | code snippet | code snippet | code snippet | |
fail-safe upload |
<aur:Uploader ID="Uploader1" runat="server" > <UploadSettings FilesPerPackage="5" /> </aur:Uploader>
$uploader = new Uploader("Uploader1"); $uploader->getUploadSettings()->setFilesPerPackage(5);
<aur:Uploader ID="Uploader1" runat="server" > <UploadSettings FilesPerPackage="10" /> </aur:Uploader>
$uploader = new Uploader("Uploader1"); $uploader->getUploadSettings()->setFilesPerPackage(10);
<aur:Uploader ID="Uploader1" runat="server" > <UploadSettings FilesPerPackage="1" ChunkSize="10485760" /> </aur:Uploader>
$uploader = new Uploader("Uploader1"); $uploader->getUploadSettings()->setFilesPerPackage(1); $uploader->getUploadSettings()->setChunkSize(10485760);
<aur:Uploader ID="Uploader1" runat="server" > <UploadSettings FilesPerPackage="3" ChunkSize="10485760" /> </aur:Uploader>
$uploader = new Uploader("Uploader1"); $uploader->getUploadSettings()->setFilesPerPackage(3); $uploader->getUploadSettings()->setChunkSize(10485760);
The main idea in fast upload is enabling multi-threaded upload. This trick can yield up to 50% increase of upload speed if a channel between a client computer and a web server is fast enough. In multi-threaded upload we divide data into several pieces and upload them simultaneously, each data piece within a separate HTTP request. To enable this feature set the MaxConnectionCount property to a positive value (we found that the best choice would be 3-4 connections). Also you should turn packages and/or chunks mode on (the FilesPerPackage property and/or the ChunkSize property has a positive value). For more information about multi-threaded upload see the Enabling Multi-threaded Upload via ActiveX/Java Uploader in ASP.NET and Enabling Multi-threaded Upload via ActiveX/Java Uploader in PHP topics, and the Sending All Files at Once or in Several Parts in ActiveX/Java Uploader topic will help you with packages and chunks.
It is a recommended to hide numbers in Upload dialog configuration when multi-threaded upload is turned on and FilesPerPackage is more than 1
.
<aur:Uploader ID="Uploader1" runat="server" > <UploadSettings MaxConnectionCount="4" FilesPerPackage="5" /> <UploadProgressDialog PreparingText = "" InfoText = "" /> </aur:Uploader>
$uploader = new Uploader("Uploader1"); $uploader->getUploadSettings()->setMaxConnectionCount(4); $uploader->getUploadSettings()->setFilesPerPackage(5); $uploadProgressDialog = $uploader->getUploadProgressDialog(); $uploadProgressDialog->setPreparingText(""); $uploadProgressDialog->setInfoText("");
<aur:Uploader ID="Uploader1" runat="server" > <UploadSettings MaxConnectionCount="4" FilesPerPackage="10" /> <UploadProgressDialog PreparingText = "" InfoText = "" /> </aur:Uploader>
$uploader = new Uploader("Uploader1"); $uploader->getUploadSettings()->setMaxConnectionCount(4); $uploader->getUploadSettings()->setFilesPerPackage(10); $uploadProgressDialog = $uploader->getUploadProgressDialog(); $uploadProgressDialog->setPreparingText(""); $uploadProgressDialog->setInfoText("");
<aur:Uploader ID="Uploader1" runat="server" > <UploadSettings MaxConnectionCount="4" FilesPerPackage="1" ChunkSize="10485760" /> </aur:Uploader>
$uploader = new Uploader("Uploader1"); $uploader->getUploadSettings()->setMaxConnectionCount(4); $uploader->getUploadSettings()->setFilesPerPackage(1); $uploader->getUploadSettings()->setChunkSize(10485760);
<aur:Uploader ID="Uploader1" runat="server" > <UploadSettings MaxConnectionCount="4" FilesPerPackage="3" ChunkSize="10485760" /> <UploadProgressDialog PreparingText = "" InfoText = "" /> </aur:Uploader>
$uploader = new Uploader("Uploader1"); $uploader->getUploadSettings()->setMaxConnectionCount(4); $uploader->getUploadSettings()->setFilesPerPackage(3); $uploader->getUploadSettings()->setChunkSize(10485760); $uploadProgressDialog = $uploader->getUploadProgressDialog(); $uploadProgressDialog->setPreparingText(""); $uploadProgressDialog->setInfoText("");
AutoRecovery* properties. Not sure what is the best upload mode here. May be we should use zip converter and send one archive file using chunks?
<aur:Uploader ID="Uploader1" runat="server" > <UploadSettings MaxConnectionCount="4" FilesPerPackage="5" /> <UploadProgressDialog PreparingText = "" InfoText = "" /> </aur:Uploader>
$uploader = new Uploader("Uploader1"); $uploader->getUploadSettings()->setMaxConnectionCount(4); $uploader->getUploadSettings()->setFilesPerPackage(5); $uploadProgressDialog = $uploader->getUploadProgressDialog(); $uploadProgressDialog->setPreparingText(""); $uploadProgressDialog->setInfoText("");
var u = $au.uploader({ id: 'Uploader1', uploadSettings: { maxConnectionCount: 4, filesPerPackage: 5 }, uploadProgressDialog: { preparingText: "", infoText: ""} });
(no chunks)
var u = $au.uploader({ id: 'Uploader1', uploadSettings: { filesPerPackage: 5 } });
var u = $au.uploader({ id: 'Uploader1', uploadSettings: { filesPerPackage: 10 } });
var u = $au.uploader({ id: 'Uploader1', uploadSettings: { filesPerPackage: 1 } });
var u = $au.uploader({ id: 'Uploader1', uploadSettings: { filesPerPackage: 3 } });
The main idea in fast upload is enabling multi-threaded upload. This trick can yield up to 50% increase of upload speed if a channel between a client computer and a web server is fast enough. In multi-threaded upload we divide data into several pieces and upload them simultaneously, each data piece within a separate HTTP request. To enable this feature set the MaxConnectionCount property to a positive value (we found that the best choice would be 3-4 connections). Also you should turn packages and/or chunks mode on (the FilesPerPackage property and/or the ChunkSize property has a positive value). For more information about multi-threaded upload see the Enabling Multi-threaded Upload via ActiveX/Java Uploader in Other Platforms topic, and the Sending All Files at Once or in Several Parts in ActiveX/Java Uploader topic will help you with packages and chunks.
It is a recommended to hide numbers in Upload dialog configuration when multi-threaded upload is turned on and FilesPerPackage is more than 1
.
var u = $au.uploader({ id: 'Uploader1', uploadSettings: { maxConnectionCount: 4, filesPerPackage: 5 }, uploadProgressDialog: { preparingText: "", infoText: ""} });
var u = $au.uploader({ id: 'Uploader1', uploadSettings: { maxConnectionCount: 4, filesPerPackage: 10 }, uploadProgressDialog: { preparingText: "", infoText: ""} });
var u = $au.uploader({ id: 'Uploader1', uploadSettings: { maxConnectionCount: 4, filesPerPackage: 1 } });
var u = $au.uploader({ id: 'Uploader1', uploadSettings: { maxConnectionCount: 4, filesPerPackage: 3 }, uploadProgressDialog: { preparingText: "", infoText: ""} });