OECGI and the input type=file' tag (OpenInsight 32-Bit)
At 09 MAR 2005 04:33:11AM Glenn Groves wrote:
Hi!
I am using OECGI to connect to the Web, and I need to be able to download files from the browser to the server. Most Web server type software will automatically download a file from the client machine onto the server, if the input type=file' tag is used. When this happens, the Web server software returns a value/returns a path to the file on the Web server, which was probably given a temporary name when it was downloaded.
However, I cannot work out how to do this/how to find out the name of the temporary file when using OECGI. I can get the file name and path from the original machine, but how do I find out what the (probably temporary) file name is? I assume the files are making it onto the Web server - in this case IIS 5 - I just need to find out from OECGI, what the name of the temporary file is, and the path where it is stored on the Web server.
Thanks!
At 09 MAR 2005 07:09AM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote:
Glenn,
What are you running on IIS5 to accept file uploads? Are you running an ASP script or trying to pass this directly to OECGI? What attributes are set in your that surround the file input tag?
For file uploading you should be using the 'ENCTYPE=multipart/form-data"' form attribute as stated in RFC1867, otherwise I don't believe the browser will actually send the contents of your file.
On the server you actually need a process that understands this encoding type, which usually means you'll need to pass it to an ASP pageā¦
Click here for more information on file uploading.
World leaders in all things RevSoft
At 09 MAR 2005 09:57AM Glenn Groves wrote:
Oops!
I had not added in the ENCTYPE=multipart/form-data" bit. Also, I am (was) trying to pass this directly to OECGI. So I need to pass it to an ASP page to write the data to file, and then "redirect" to OECGI?
At 09 MAR 2005 10:36AM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote:
Glenn,
Yes - basically you need something on the web-server that understands the encoding format used by the browser - this could be an ASP page, but it could just as easily be an ISAPI DLL, PHP page, Java Servlet etc.
Once you've got it you can invoke OECGI.EXE passing it the location of the file and take it from there.
World leaders in all things RevSoft
At 09 MAR 2005 07:49PM Paul Simonsen wrote:
Glenn,
Well, I'm not sure if this will work for you or not, but you can capture the file inside OI in a raw format through the OECGI.
In your registry settings for OECGI, you can change the ProcedureName from RUN_OECGI_REQUEST to be another program. Set up that program to have some incoming parameters and throw a debug in there. The first parameter should be the Request parameter and the uploaded file data should be in that variable.
Then it is just a matter of seeing if you can parse out the data.