public interface FiledownloadListener
Filedownload.saveResumable(java.io.File, java.lang.String, java.lang.String)
to reject
a download if the user tried to resume it in unacceptable situation.
Available in ZK EE
For example, you might allow the user to reuse the download
for, say, 24 hours, then you can pass a special key to denote it
in the data argument when calling Filedownload.saveResumable(java.io.File, java.lang.String, java.lang.String)
.
Then, you can check the data argument when onDownload(org.zkoss.util.media.Media, java.lang.Object, java.lang.String)
is called back.
Filedownload
Modifier and Type | Method and Description |
---|---|
Media |
onDownload(Media media,
java.lang.Object source,
java.lang.String data)
Notifies that the user is requesting the media to download.
|
Media onDownload(Media media, java.lang.Object source, java.lang.String data)
Filedownload.saveResumable(java.io.File, java.lang.String, java.lang.String)
to authenticate
or filter the download.media
- the media that will be downloaded to the client.source
- the source of the download. It is the file argument
of Filedownload.saveResumable(File, String, String)
,
the url argument
of Filedownload.saveResumable(URL, String, String)
, and
the path argument
of Filedownload.saveResumable(String, String, String)
.data
- the data argument passed to Filedownload.saveResumable(java.io.File, java.lang.String, java.lang.String)
.Copyright © 2005-2023 Potix Corporation. All Rights Reserved.