[Gambas-user] Using gb.web in my own gambas web server

Benoît Minisini gambas at ...1...
Tue Jun 30 11:48:22 CEST 2009


> Hi Benoit, hi to all.
>
> You kwon I'm the author of BaShare, a simple web server with a GUI useful
> in file sharing.
>
> I'm trying to implement file reception in BaShare from a web form like
> this:
>
> <form method='post' action='http://localhost:65001' name='Upload'
> enctype='multipart/form-data'>
> <input name='File' type='file'><br><br><input value='Invia' name='SubBtn'
> type='submit'><br>
> <input type='hidden' name='action' value='upload'>
> </form>
>
> So it was very useful if was possible to use gb.web in my application. I
> tryed this:
>
> PUBLIC SUB Socket_Read()
>
>
>     PRINT Request.Fields.Count
>
>      TRY LAST.Close
>      TRY client.Remove(client.Find(LAST))
>
> END
>
> but Request.Fields.Count is 0
>
> The alternative is to parse manually the stream... but is very tedious.
>
> Have you some suggests?
>
> Thank you very much.

As stated in the documentation, gb.web allows you to implement *CGI* scripts, 
i.e. executables that are run by the HTTP server and that return the HTTP 
response on their standard output stream.

Regards,

-- 
Benoît




More information about the User mailing list