Class Filedownload

java.lang.Object
org.zkoss.zul.Filedownload
org.zkoss.zkmax.zul.Filedownload

public class Filedownload extends Filedownload
More filedownload utilities, such as resumable filedownload.

Available in ZK EE

Resumable Download

By resumable we mean the user can bookmark the URL and download it later (and even resume the download in the middle). On the other hand, the download URL of Filedownload becomes obsolete as soon as the desktop (or session) is gone.

Since the resumable download can be used in any session or without any session, or with a different client (such flashget), you might want to limit the download under certain condition.

First, there are two library properties that can control the number of allowed resumable downloads.

org.zkoss.zk.download.resumable.lifetime
Specifies when the download URL will be expired (unit: second).
Default: 14400 (i.e., 4 hours).
org.zkoss.zk.download.resumable.maxsize
Specifies the maximal allowed number of resumable downloads.
Default: 4096.

Second, you can have more control by implementing FiledownloadListener and specify it as a library property called org.zkoss.zkmax.zul.FiledownloadListener.class. For example, you can specify the following in zk.xml:

<library-property>
  <name>org.zkoss.zkmax.zul.FiledownloadListener.class</name>
  <value>com.foo.MyDownloadListener</value>
</library-property>
Since:
3.5.0
Author:
tomyeh
See Also: