AWS <INPUT TYPE=FILE>

I want to be able to read the contents of a file on the users PC. I have put a “Browse” box/button on the page together with a submit button. Now how do I get hold of the selected filename and read it? Regards Stephen.

Netsilicon provides an example application naficgi in netos\src\examples directory. This application upload files from pc to NETARM(running AWS) and display the content of the selected file. You can refer to this application and modify it to make it work in the way as you like.

You implement a file system for the HTTP server to write to. e.g. When the HTTP server calls your implementation of RpErrorCode RpHSCreateFile(int theFileNumber, char * theFullNamePtr, FILEINFOPTR theFileInfoPtr) you will have the file’s name. The HTTP server already knows to call this function the same way apache on you Linux box knows to call open. 6.0 seems to come with a file system, but I have not really played with it’s file system yet.

Hi, I know this is an old thread but I would also like to know the answer to this. I would like to get the selected filename as I want to do some preprocessing to the file before uploading it to Flash.

I can’t file the naficgi example app in the netos/src/examples directory. I am using Net_Os 6.0. I also don’t know how to override the RpHSCreateFile function, although I could modify the original. This would be awkward as I have another page in a sister app that wants the default behaviour.

Regards,
Giles