CGI / Binary Read

Chipp Walters chipp at chipp.com
Tue Feb 5 02:47:00 EST 2002


You can check out my altSAFileUp Library at
http://www.altuit.com/webs/altuit2/RunRev/Downloads.htm

It successfully uploads files in forms using the standard RFC1867 and should
work with any compliant serverside toolset. This addresses the UPLOAD client
side...I don't know about the server MC-CGI.

-Chipp Walters

-----Original Message-----
From: metacard-admin at lists.runrev.com
[mailto:metacard-admin at lists.runrev.com]On Behalf Of undo at cloud9.net
Sent: Tuesday, February 05, 2002 12:41 AM
To: metacard at lists.runrev.com
Subject: Re: CGI / Binary Read


Yennie at aol.com wrote:
>
> << If all else fails compress the file before uploading and decompress on
> the server.
> Make sure you get all the data over (same length before and after)!! >>
>
> Unfortunately, my clients won't like that much =).
> The weird thing is, the $CONTENT_LENGTH is being reported as "48", and my
> graphic is certainly larger than that (I'm uploading JPEG files to be
> analyzed by the CGI). So, I'm getting the 48 bytes as reported, but that's
> it. Where's the rest? I'm running under Apache and Darwin...

But how do you upload them?

>
> Here's my script in case anyone catches something...
>
> #!mc
> on startup
>   set the shellCommand to "/bin/tcsh"
>
>   put $CONTENT_LENGTH into theLength
>   put $CONTENT_TYPE into theType
>   put char (offset("boundary=",theType) + 9) to -1 of theType into
theBoundary
>
>   read from stdin until eof
>   put it into theArgs
>
>   put "Length:"&theLength&"<BR>" after theText
>   put "Boundary:"&theBoundary&"<BR>" after theText
>   put "Args:"&theArgs after theText
>
>   put "Content-Type: text/html"
>   put "Content-Length: "&length(theText)&cr&cr
>   put theText
>
> end startup
>
> Regards,
> Brian
> _______________________________________________
> metacard mailing list
> metacard at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/metacard

--
____________________
Regards, Andu Novac
_______________________________________________
metacard mailing list
metacard at lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard




More information about the metacard mailing list