FileDownloader.FileList Property

Supported browsers: Internet ExplorerFirefoxGoogle ChromeSafari

URL of the text file which contains a list of files to download.

Syntax

Initialize

JavaScript
<script type="text/javascript" src="iuembed.js">  </script>
<script type="text/javascript">
var fd = new FileDownloaderWriter("FileDownloaderID", 610, 500);
//...other params...
fd.addParam("FileList", "");
//...other params...
fd.writeHtml();
</script>

Get/Set Value in Runtime

JavaScript
getFileDownloader("FileDownloaderID").setFileList(value);
value = getFileDownloader("FileDownloaderID").getFileList();

Property Value

A string which specifies the URL of the text file which lists files for download.

Default value is "".

Remarks

The file list should reside on the same server where File Downloader resides.

Each entry in the list occupies one line and has the following format.

Content-type | Size | Name | URL

Where:

Content-type

Is a MIME type of the file.

Size

Is a size of the file in bytes. Specifying the file size is optional; to ignore it set the parameter to 0.

Name

Is a name under which the file will be saved. This field can be a path with subfolders that will be created before saving the file. This path cannot contain relative paths like ..\folder\file.ext. That is, the ..\folder\file.ext value is incorrect, but the folder\file.ext value is acceptable.

URL

Is a URL of the file.

Note

The order of fields is important. The fields cannot be empty.

The file list is downloaded when the user clicks the Download button or when the M:FileDownloader.DownloadFileList method is called. If any entries were added to the list manually before the list was downloaded, they will not be deleted. Instead, entries from the list specified with this property will be added to the end of the manually constructed list.

If while adding a successive entry to the file list it turns out that the list already contains an entry with the same URL and Name values, the new "duplicate" entry will not be added, and the E:FileDownloader.Error event will be raised. This event will contain the number of the "original" item, which is already in the list, as the Index parameter.

See Also

Manual

Reference