.CLIENT DISPLAY FILE
This subroutine will download and open a file on the user's PC. Available in Release 5.4.4c and up
PASS <status_code> FIELD SHARE? Y
PASS <source_file> FIELD SHARE? N
PASS <display_name> FIELD SHARE? N
GOSUB --- .CLIENT DISPLAY FILE
* check for errors
IF --- .CLIENT DISPLAY FILE NE
This subroutine will download a file to the user's PC and automatically open it using either the default program (if the user is running the Desktop Client) or in a new Browser tab (if the user is running the HTML client). The first two parameters are required, if any are missing the subroutine will CANCEL. The <display_name> is optional.
<status_code> is the code returned to indicate if the transfer was successful (Required). This field must be PASSed with Share "Y" to receive the value. A value of 1 indicates the transfer was not successful and 0 indicates success. If the transfer failed, you can check --- .CLIENT DISPLAY FILE for more information.
<source_file> is the is the full path and file name on the Appx server that you want to transfer to the user's PC (Required). This must be a file readable by user 'appx' (Linux/Unix) or the current user (Windows).
<display_name> is an optional field. This has no meaning if the user is running the Desktop Client and is ignored if PASSed. If they are running the HTML client, this will be trailing part of the URL displayed in the browser window. If not passed, it will default to the file name portion of <source_file>. Note that if you supply a <display_name>, it must include the correct file extension.
If the user is running the Desktop Client, the file will be uploaded to their cache folder and automatically deleted after a period of time to avoid filling their disk. If they are running the HTML client, it will be stored on the server running the APPX Server Connector, and also automatically deleted after a period of time. If the user refreshes the tab after this period of time, they will get Error 404 as the document no longer exists.
Uploading a file to an HTML client user with this API does NOT require a Local Connector to be running on their device
Read what other users have said about this page or add your own comments.