Tags:
create new tag
view all tags

.CLIENT DISPLAY FILE

This subroutine will download and open a file on the user's PC. Available in Release 5.4.4c and up


Usage:

      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

Description:

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.

NOTE: Uploading a file to an HTML client user with this API does NOT require a Local Connector to be running on their device

Comments:

Read what other users have said about this page or add your own comments.


-- JeanNeron - 2012-01-31

Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2016-10-21 - AlKalter
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback