At 10:27  -0800 2007/01/28, Oleg Kobchenko wrote:
--- bill lam <[EMAIL PROTECTED]> wrote:

 Oleg Kobchenko wrote:
 > Shouldn't uploading be just a matter of parsing
 > stdin with mime sections?

I meant uploading 1MB is simple but not so trivial for uploading 100MB. I think that http server is smart enough to handle it but may be tricky for cgi. perl cgi.pm seems automatically save data to a temp file, and then cgi program then
 open this temp file for reading.

Saving to temp files is a typical way of handling
uploaded files, but not the only one. It is the
responsibility of the CGI program (with help of
a library), but web server just streams it via stdin.
Technically the stdin mimes can be consumed on the fly
if, for example, they are meant to be stored in a database
instead of files.

That's the reason I was proposing buffered (streamed)
stdin reader. With a streaming mechanism, large quantities
of data can be handled with very low memory footprint.

I agree this would be a nice feature to have available -
meanwhile, copying to a tmp file was the solution I
stumbled across in handling uploads. Processing the
tmp file in my jCGI is also a small memory footprint.

On the other hand, being able to act more "real time"
would be great for some applications.

- joey
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to