Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Added: | ||||||||
> > |
.CLIENT DOWNLOAD FILEThis subroutine will download a file to the user's PC.Usage:PASS <status_code> FIELD SHARE? Y PASS <dest_file> FIELD SHARE? Y PASS <source_file> FIELD SHARE? N PASS <convert_flag> FIELD SHARE? N GOSUB --- .CLIENT DOWNLOAD FILE * check for errors IF --- .CLIENT DOWNLOAD FILE NE Description:This subroutine will download a file to the user's PC. The first three parameters are required, if any are missing the subroutine will CANCEL. The <convert_flag> 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 DOWNLOAD FILE for more information. <dest_file> is the destination on the user's PC (Required). You can refer to macro names in the destination, ie, you can use any of the names you see in the [LocalPaths] section of the Desktop Client preferences, just prefix them with a $ and surround them with parentheses, ie, $(userHome). <source_file> is the 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). <convert_flag> indicates if any file conversion is required (Optional). If zero or not passed, then no conversion will be done. A value of 1 means convert the file automatically based on the filename extension. A value of 2 means convert the file automatically based on the contents of the file (ie, it won't convert binary files). A value of 3 means do the conversion regardless of file type. If conversion is requested, this routine will make a temporary copy of the file, converting as necessary, then upload the converted file. The temporary copy will be deleted. The temporary copy is created in the applications 'Tmpdata' folder, same as the working files for a restructure. The routine considers the following file extensions to be text files:
Host Client Source OS OS File Type Conversion -------- ---------- -------------- ------------------------- UNIX UNIX UNIX No conversion needed. UNIX UNIX WINDOWS CR/LF to LF UNIX WINDOWS UNIX LF to CR/LF UNIX WINDOWS WINDOWS No conversion needed. WINDOWS WINDOWS WINDOWS No conversion needed. WINDOWS WINDOWS UNIX LF to CR/LF WINDOWS UNIX WINDOWS CR/LF to LF WINDOWS UNIX UNIX No conversion needed. Comments:Read what other users have said about this page or add your own comments.-- JeanNeron - 2012-01-31 |