Generic File Manager Access Utility (FNDGFU)

The Generic File Manager (GFM) is a set of PL/SQL procedures that leverages Oracle HTTP Server functionality to provide generic upload and download capabilities of unstructured data between a client (usually a web browser) and a database.

FNDGFU is an access utility that allows the upload of files from the local file system to the GFM database file system. It supports simple uploads of single files as well as bulk uploads of many files. FNDGFU also offers a download option that provides a convenient and quick means of retrieving the contents of large objects (LOBs) if the file identifier is known.

This utility is used in uploading help files for the Oracle E-Business Suite online help system. For information on downloading and uploading Oracle E-Business Suite help files, see: Downloading and Uploading Help Files.

To delete files loaded to the database run the Purge Obsolete Generic File Manager Data concurrent program.

Usage

FNDGFU is located in the $FND_TOP/bin directory. Putting this directory on your path will allow you to invoke FNDGFU easily.

Upload files to the GFM

To upload files using FNDGFU use the following syntax:

FNDGFU <logon> [param] <filenames> 

where

<logon> Specifies a standard Oracle logon string of the form username/password. To specify a particular database, append an @ sign and the database SID (@database).
[param] Includes the following parameters (in any order) as appropriate:
PROGRAM_NAME=<name> specifies the name of the program on whose behalf the LOB is to be maintained.
PROGRAM_TAG=<name> specifies the program tag, which is a string used by the GFM client program to further categorize the LOB.
LANGUAGE=<language_code> specifies the language of the file.
PLS_CALLBACK=<plsql procedure> specifies the procedure to execute once for each uploaded file. The procedure must accept file_id as its only parameter. FNDGFU will call the specified procedure after each uploaded file, passing in the new file identifier, for example: PLS_CALLBACK=mypackage.myprocedure.
CONTENT_TYPE=<mime_type> specifies the default mime type to use for uploaded files not qualified by a content map.
CONTENT_MAP=<contentmapfile> specifies a text file that maps filename suffixes onto content types. The text file consists of lines of the form <suffix>=<mime_type> where suffix is any string matched against the end of the filename. For example: ".txt = text/plain", ".html = text/html", and ".ps = application/postscript".
<filenames> Specifies the files to upload. Any number of files may be uploaded.

Download files from the GFM

To download a file using the FNDGFU utility, use the following syntax:

FNDGFU <logon> DOWNLOAD=<fileid> [LINE_BREAKS=<mode>] [filename] 

where

<logon> Specifies a standard Oracle logon string of the form username/password. To specify a particular database, append an @ sign and the database SID (@database).
<fileid> Specifies the identifier of the large object (LOB) to download.
<mode> Specifies how to treat line breaks for a text document. This parameter is ignored for nontext content. The following values are valid:
LF - Line breaks will be represented using "/n" in the downloaded output. This is the default mode if the LINE_BREAK parameter is omitted.
CRLF - Line breaks will be left in the canonical format.
[filename] Specifies the file into which to download. If omitted, downloaded contents are streamed to the standard output.

Example of FNDGFU Upload

The FNDGFU utility can be used to upload new or changed help files. Use the following arguments to upload help files:

FNDGFU <apps/pwd> 0 Y PROGRAM_NAME=FND_HELP PROGRAM_TAG=<application>:<custom_level> CONTENT_TYPE=<mime_type> LANGUAGE=<language_code> <filenames> 

where

<apps/pwd> is the APPS schema username/password. To specify a particular database, append an @ sign and the database SID (@database).
<application> is the Application short name.
<custom_level> is the files'customization level. Use the number 100 or above for customized help files. To replace previously uploaded files, use the same customization level when uploading the new files. To override previously uploaded files without deleting them from the database, use a higher customization level.
<mime_type> is the files' MIME type.
<language_code> is the files' language code.
<filenames> is a space-separated list of files to upload, or a filename glob in the current directory.

Enter all arguments on a single command line. They may appear on separate lines here and in the examples that follow depending on the display medium.

Example 1

FNDGFU apps/apps@devdb 0 Y PROGRAM_NAME=FND_HELP PROGRAM_TAG=GL:100 CONTENT_TYPE=text/html LANGUAGE=US file1.htm file2.htm

Example 2

FNDGFU apps/apps@custdb 0 Y PROGRAM_NAME=FND_HELP PROGRAM_TAG=FND:100 CONTENT_TYPE=image/gif *.gif

Purging Generic File Manager Data

To purge uploaded files from the Generic File Manager, run the concurrent program, Purge Obsolete Generic File Manager Data.

This concurrent program should also be used to periodically expunge expired data. It is recommended that you schedule this program to run every day or so, using the default parameter values.