Downloading multiple files

Home > HD application > Example 01

Explanation

DEXTUploadX5 HD application is a setup-based program that helps you to perform multiple file downloads.

HD applications are not browser plug-ins and are provided as exe files (pkg on macOS). Therefore, the client user must download the component and install it manually.

If a local installation is not made, the page is moved to the hdDownloadURL location set in the dextuploadx5-configuration.js file. Therefore, the component must be configured to be downloaded from the target page. If you continue to navigate to the download page after installation, the HD application may be blocked from use. If HD applications are blocked, you should check if the problem is caused by a security solution like an antivirus.

To download the file, use the downloadToHD function. The target must be a virtual file that has the value of the url property.

var dx = dx5.get("component-id");

// The download web path must be present in the url property. 
dx.addVirtualFile({ ... name: "bridge_509147.jpg", url: "http://.../bridge_509147.jpg" });

// Download a virtual file by the unique ID. 
dx.downloadByIdToHD("the unique ID of the virtual file");

// Perform the download according to the flag value.
// AUTO:  Download virtual files.
// SELECTED: Download selected virtual files.
// CHECKED: Download checked virtual files.
dx.downloadToHD("SELECTED");

If the address you want to download contains multilingual characters, you can return a 404 response code without finding the target to download if the server is Tomcat. For Tomcat, the URL is decoded to ISO-8859-1, so you need to change the Tomcat URL encoding method.

# server.xml
<Connector connectionTimeout="20000" 
	port="8080" protocol="HTTP/1.1" 
	redirectPort="8443" 
	URIEncoding="UTF-8"/>

If you use mod_jk to connect to Apache, you should apply the same to mod_jk.

# server.xml
<Connector port="8009" protocol="AJP/1.3" 
	redirectPort="8443"
	URIEncoding="UTF-8"/>

Example

You can manually set the download path. Use it when you want to download to the same path for each user. To set the path directly as a string, use two backslashes (\\), separated by a slash (/) in macOS. When typing the input-box, use only one backslash (\) (one slash (/) in macOS).

You can specify a specific location as a keyword. <home>: the user's Home folder, <doc>: User Documents folder, <desktop>: the user's Desktop folder, <Downloads>: your Downloads folder (supported since version 2.5.0.0), an additional path after entering a specific keyword, and You can specify a sub-folder to put.

Generally, all virtual files are targeted for downloading, and the url property of the virtual file is targeted for downloading.