Top
NetCOBOL V11.0 ISAPI Subroutines User's Guide
FUJITSU Software

3.1.2 File Upload Function

The file upload function transfers client-side-generated data (files) to the WWW Server.

This function is valid in the following cases:

Using the file upload function, file transfer can be associated with applications. Therefore, data can be checked and registered immediately after file transfer.

The following conceptual chart of processing which uses the file upload function is shown below:

Web subroutines provide the following functions to easily create such application programs:

Function

Subroutine name

Usage

File upload

COBW3_GET_UPLOADFILE_INFO

COBW3_GET_UPLOADFILE_INFO_X

COBW3_GET_UPLOADFILE_INFO_N

Acquires the information on an upload file.

COBW3_GEN_UPLOADFILE

COBW3_GEN_UPLOADFILE_X

COBW3_GEN_UPLOADFILE_N

Generates an uploaded file on the WWW Server.

COBW3_DEL_UPLOADEDFILE

Deletes an uploaded file.

To upload a file, the following values must be written on the Web page for invoking an application:

Tag name

Attributes

Value

FORM

METHOD

POST

ENCTYPE

multipart/form-data

INPUT

TYPE

file

For details of these tags and attributes, see the "NetCOBOL Web Guide" and other documentation resources that explain HTML.

The above tags can be used together with the INPUT tag of other types (that is, other than "file") in the same FORM. The data that corresponds to these INPUT tags can be acquired by a subroutine such as COBW3_GET_VALUE regardless of whether the file upload function is used.

Note

  • In this Web subroutines, size of the uploaded files should be 999,999,999 bytes or less. Even if it is a file of 999,999,999 bytes, data cannot occasionally be received according to WWW Server.

  • The NAME value specified in the INPUT tag (TYPE="file") for uploading files cannot be used in the INPUT tag of other types (that is, other than "file"). Otherwise, the normal operation of the Web subroutine is not assured.

Example

    :
<INPUT TYPE="text" NAME="FILE1">
<INPUT TYPE="file" NAME="FILE1">    ß Do not specify
    :