RpFormInput Type=FILE

Hi,

I posted this as a reply to a thread on the “Other” forum, but I think this is a more relevant place for it.

I have put a “Browse” box/button on the page together with a submit button. How do I get hold of the selected filename so that I can do something with the file, either before, after or instead of the Upload? I would like to do some preprocessing to the file before uploading it to flash.

I am using Net+OS 6.0. Someone else suggested the naficgi example app but I can’t find this app in the netos/src/examples directory.

FYI, the form and input fields are defined as follows:

I am looking to accomplish the same task. Can someone help us out?

Thank you in advance,
Ed Sudit

As to the following:
Someone else suggested the naficgi example app but I can’t find this app in the netos/src/examples directory

In V6.0 it is possible that the cgi example was nacgi (no fi in the example project name)

As to the other question. The file file.c is the interface between the AWS and the file system. So you’d need to make changes/add code to file.c to access the file name and get it to do anything beyond its intended behavior which is to act as the file system interface to AWS.

With regards to file.c, there is a method called RpHSCreateFile that looks like what we would need. The thing here is that one of the parameters to the method is the pointer to the full file name called theFullFileNamePtr which is pointing to the pure name of the file without the folder name. The question then is where is this method being called from and where is the pointer being assigned to the name of the file stored in the “TYPE=FILE” field on the HTM page?

New info. Apparently, Digi uses a third party, AllegroSoft, that provides code for a utility called RomPager. This utility is the interface between AWS and the file system. By the time the methods in file.c are called, the path and filename are already set based on the value of the field on the HTM page.
Anyone know how to be able to change the name of the file that is specified on the HTM page to something else?