This function is used to download a file from the server, possibly to display a preview in the browser. Depending on the parameters, a copy of the file may be made in the temporary directory then deleted when the download expires.
Context
Adelia Cloud client.
Parameters
ALPHA (n) |
FileName |
Name of file to download. |
BOOL |
Inline |
Indicates if the file must be displayed in a preview. If inline is *TRUE and the file's mime type is supported by the browser (images, etc.), a file preview is displayed on the desktop, otherwise the file is downloaded. |
BOOL |
ReturnCode |
Operation return code: *TRUE if the function call is successful. *FALSE if not. |
Note:
The data is cached for 30 minutes (by default). This allows to resume an interrupted download process or to launch several download requests.
This wait time is configurable by changing the timeToIdleSeconds and timeToLiveSeconds parameters of the wagonDownloadCache cache in the ehcache.xml file of your Wagon application.
NB: it is strongly recommended that you do not change the other parameters of this file, particularly the parameters of the other caches.
Example
FileName = 'HOME:\documents\document.docx'
CALL_DLL 'VATOOLBX.DLL' 'VaToolBxCloudDownloadFile' FileName *FALSE ReturnCode
List of the VaToolBx functions by topic