--- Joey K Tuttle <[EMAIL PROTECTED]> wrote:
> I my description of the upload facility I'm using, I should
> have noted that one of the problems I ran into was large files
> did not work directly because of buffer limitations in j's
> implementation of stdin... So my upload form invoked this CGI
>
> #!/bin/bash
> tf=/tmp/fdat$$
> cat > $tf
> ./pfdat $tf "$REMOTE_ADDR" "$HTTP_USER_AGENT" "$$"
>
> were the last line is the call to a j #! script "pfdat" which
> did the other things I described in my previous message. This
> was a very good work around for the stdin buffering issues.
>
> - joey
This interesting solution would still be an option for some
specific cases of manually configured CGI handlers. It is possibly
not a mainstream JHP for temp folder complication, but to
allow integration these considerations may help:
- the command-line parameters to JHP should be the same as
called with regular JHP handler (there is no need to pass
env vars to command line since they are inherited anyway)
- the indication that stdin is redirected to a file by
means of an environment variable, such that, if set will
indicate JHP to read from that file instead of stdin
Note #! J scripts are not easily portable (at least
require additional configuration). Looking at other
scripting languages, it's perfectly OK to use command-line
in the form
[prefix/]jconsole script_location args ...
Where [prefix/] is plaform specific invokation-level
issue, as opposed to script content, which remains
platform independent.
JHP is script-level portable, and only requires
platform-specific external configuration.
> tf=/tmp/fdat$$
Does this shell notation create a unique temp name?
Will the temp file be automatically deleted on process exit?
If not how better arrange that?
____________________________________________________________________________________
Moody friends. Drama queens. Your life? Nope! - their life, your story. Play
Sims Stories at Yahoo! Games.
http://sims.yahoo.com/
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm