Products Downloads


French version


 

This function is used to download a file from the server and 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. Or the file can be read directly until the download expires.

 

Context

  • Adelia Cloud client.

Parameters

ALPHA(n)

FileName

Name of file to download.

ALPHA(n)

MimeType

Name of mime type or *BLANK.

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

CreateTempCopy

If this option is *TRUE, a copy of the file will be created in the machine's temporary directory then deleted when the download expires.

If it is *FALSE, the download manager will access the file directly. In this case, the file needs to remain available and not be changed during the configured download cache time.

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.


For example:

FileName = 'HOME:\documents\document.docx'
MimeType = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
CALL_DLL 'VATOOLBX.DLL' 'VaToolBxCloudDownloadFileEx' FileName MimeType *FALSE *FALSE ReturnCode

↑ Top of page


  • Aucune étiquette