Implements custom authentication for file transfers using the mlfiletransfer utility or the MLFileDownload method.
In the following table, the description provides the SQL data type. If you are writing your script in Java or .NET, you should use the appropriate corresponding data type. See SQL-Java data types and SQL-.NET data types.
In SQL scripts, you can specify event parameters by name or with a question mark. Using question marks has been deprecated and it is recommended that you use named parameters. You cannot mix names and question marks within a script. If you use question marks, the parameters must be in the order shown below and are optional only if no subsequent parameters are specified (for example, you must use parameter 1 if you want to use parameter 2). If you use named parameters, you can specify any subset of the parameters in any order.
Parameter name for SQL scripts | Description | Order (deprecated for SQL) |
---|---|---|
s.file_authentication_code |
INTEGER. Required. This is an INOUT parameter. It indicates the overall success of the authentication. If this value is 1000-1999, file transfer is allowed. If this value is 2000-2999, file transfer is not allowed. |
1 |
s.filename | VARCHAR(128). Required. This INOUT parameter is the name of the file that is being transferred that is to be authenticated. Do not include a path and do not use ellipsis (three dots), comma, forward slash (/) or backslash (\). The file must be located in the root transfer directory that you specified with the mlsrv12 -ftr or -ftru option, or in one of the subdirectories that are automatically created. If this is not set explicitly, the default is the filename that was passed to the MobiLink server by the client. | 2 |
s.username | VARCHAR(128). The MobiLink user name. | 3 |
s.subdir | VARCHAR(128). This optional INOUT parameter sets the subdirectory location for the files to be transferred. To use the root directory, set this option to null. This option must not include ellipsis (three dots), comma, forward slash (/) or backslash (\). This defaults to remote_key if it is not set explicitly. | Not applicable |
s.remote_key | VARCHAR(128). Optional IN parameter to specify a remote key for the file transfer. | Not applicable |
The MobiLink server executes this event before allowing any download file transfer using the mlfiletransfer utility or MLFileDownload method. It is executed after the user has authenticated using regular authentication. If this script is not defined, the file transfer is allowed.
The MLFileDownload method can only be used by UltraLite clients.
Discuss this page in DocCommentXchange.
|
Copyright © 2012, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.1 |