Uploading files via OECGI4
You can upload files via a web browser to your OpenInsight application via OECGI4. There are two registry settings that control file uploads.
Registry Setting | Value |
---|---|
FileMode | There are 3 possible settings: 1 = upload file to the directory specified in FilePath, and delete it when the OECGI4 request is completed. 2 = upload file to the directory specified in FilePath 3 = upload the file directly to OpenInsight. You can only upload text files (text, csv, xml, html etc) via this mode. It does not support binary files like images or pdf’s. Use mode 1 or 2 for binary file types. Note: For modes 1 & 2, OECGI4 will assign a temporary filename to the file physically located in the FilePath. The name of the temporary file will be passed to OpenInsight in the request string and accessible via INET_QUERYPARAMS |
FilePath | The directory where the file will be uploaded for modes 1 & 2. This path is relative to the directory where OECGI4.EXE is located. |
Example 1:
OECGI4.EXE is located in c:\inetpub\scripts
FilePath is set to upload\
In this scenario OECGI4 will upload the file to c:\inetpub\scripts\upload
Example 2:
OECGI4.EXE is located in c:\inetpub\scripts
FilePath is set to \upload\
In this scenario OECGI4 will upload the file to c:\inetpub\upload
Note 1: You must add a backslash \ to the end of the FilePath setting.
Note 2: You must enable write permissions to the upload directory specified in FilePath.
Note 3: FilePath is ignored when FileMode is set to 3
Table 2 - File upload registry settings.
Here is an example of the registry settings for:
FileMode = 2
FilePath = c:\Revsoft\OInsight\o4w\uploads\
These settings will upload a file to the c:\inetpub\upload directory on the web server and will delete the file once your inet procedure has completed.