lucee.Componentcommandbox.system.util.ProgressableDownloader
Copyright Since 2014 CommandBox by Ortus Solutions, Corp www.coldbox.org | www.ortussolutions.com Allows a file to be downloaded progressively with a callback UDF for status
Property Summary | ||||
---|---|---|---|---|
type | property | default | serializable | required |
any
|
ConfigService
|
true
|
false
|
|
any
|
shell
|
true
|
false
|
Method Summary | |
---|---|
any
|
download(string downloadURL, string destinationFile, [any statusUDF], [any redirectUDF=''])
Call me to download a file with a status callback. |
private binary
|
getByteArray(numeric size)
|
private any
|
resolveConnection(string downloadURL, [any redirectUDF])
|
Methods inherited from class lucee.Component |
---|
None |
Property Detail |
---|
access
- publicrequired
- falsereturntype
- anyinject
- ConfigServiceserializable
- trueaccess
- publicrequired
- falsereturntype
- anyinject
- shellserializable
- trueMethod Detail |
---|
Call me to download a file with a status callback
downloadURL
- The remote URL to downloaddestinationFile
- The local file path to store the downloaded filestatusUDF
- A closure that will be called once for each full percent of completion. Accepts a struct containing percentage, averageKBPS, totalKB, and downloadedKBredirectUDF
- A closure that will be called once for every 30X redirect followedsize
downloadURL
redirectUDF