[Xitami] File upload with xitami???

Marc Doigny xitami@lists.xitami.org
Sat, 22 Sep 2001 10:51:53 +0200


--=====================_87407894==_.ALT
Content-Type: text/plain; charset="us-ascii"; format=flowed

hello !

Does file upload works with Xitami?

I use this sample file as request for upload:

<html><head></head>
<body bgcolor=white>
<form action=http://web.verfaillie.com/cgi-bin/env.exe method=post>
<input type=file name="123.txt"><br>
<input type=submit value="Send">
</form>
</body></html>

The scripts executes correctly (env.exe only prints the windows 
environment) but where can i find the uploaded file???


Thats the back-end VB program:

Sub main()
     Open "c:\test.txt" For Output Access Write As #1
     Print #1, "start"
     a$ = Environ$("CGI_STDOUT")
     Open a$ For Output Access Write As #3
     Print #3, "<html><body><pre>"
     a$ = Environ$(1)
     While a$ <> ""
         Print #3, a$; "<br>"
         Print #1, a$
         i = i + 1
         a$ = Environ$(i)
     Wend
     Print #3, "</body></html>"
     Close
     End
End Sub


--=====================_87407894==_.ALT
Content-Type: text/html; charset="us-ascii"

<html>
hello !<br>
<br>
Does file upload works with Xitami?<br>
<br>
I use this sample file as request for upload:<br>
<br>
&lt;html&gt;&lt;head&gt;&lt;/head&gt;<br>
&lt;body bgcolor=white&gt;<br>
&lt;form action=http://web.verfaillie.com/cgi-bin/env.exe
method=post&gt;<br>
&lt;input type=file name=&quot;123.txt&quot;&gt;&lt;br&gt;<br>
&lt;input type=submit value=&quot;Send&quot;&gt;<br>
&lt;/form&gt;<br>
&lt;/body&gt;&lt;/html&gt;<br>
<br>
The scripts executes correctly (env.exe only prints the windows
environment) but where can i find the uploaded file???<br>
<br>
<br>
Thats the back-end VB program:<br>
<br>
Sub main()<br>
&nbsp;&nbsp;&nbsp; Open &quot;c:\test.txt&quot; For Output Access Write
As #1<br>
&nbsp;&nbsp;&nbsp; Print #1, &quot;start&quot;<br>
&nbsp;&nbsp;&nbsp; a$ = Environ$(&quot;CGI_STDOUT&quot;)<br>
&nbsp;&nbsp;&nbsp; Open a$ For Output Access Write As #3<br>
&nbsp;&nbsp;&nbsp; Print #3,
&quot;&lt;html&gt;&lt;body&gt;&lt;pre&gt;&quot;<br>
&nbsp;&nbsp;&nbsp; a$ = Environ$(1)<br>
&nbsp;&nbsp;&nbsp; While a$ &lt;&gt; &quot;&quot;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Print #3, a$;
&quot;&lt;br&gt;&quot;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Print #1, a$<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; i = i + 1<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; a$ = Environ$(i)<br>
&nbsp;&nbsp;&nbsp; Wend<br>
&nbsp;&nbsp;&nbsp; Print #3, &quot;&lt;/body&gt;&lt;/html&gt;&quot;<br>
&nbsp;&nbsp;&nbsp; Close<br>
&nbsp;&nbsp;&nbsp; End<br>
End Sub<br>
<br>
</html>

--=====================_87407894==_.ALT--