Variable Contents in File Upload

Post Reply
Kris@Kineta
Posts: 5
Joined: Wed Jan 16, 2002 4:52 pm

Variable Contents in File Upload

Post by Kris@Kineta »

Hi,


I don't understand why I'm having this problem all of a sudden, but I want to make sure it isn't a Vortex related issue.

Let's assume the following code...
<form method="POST" ENCTYPE="multipart/form-data" action="$url">
<input type="file" name="infile">
<input type="submit">
</form>


I have a file being uploaded, and the upload handled by my Vortex script. If the user is using IE 5 under Win98 (Or possibly other combinations) the contents of the $infile variable is the path and name for the file being uploaded. However, under Netscape 4.7 on Linux, $infile holds the text of the file's contents.

is there a major difference in the headers that are sent or something that would cause this? Any ideas at all?

This is the Jul 27, 2001 build of texis, running on Linux


Thanks,

Kris@Kineta
User avatar
Kai
Site Admin
Posts: 1272
Joined: Tue Apr 25, 2000 1:27 pm

Variable Contents in File Upload

Post by Kai »

Seems like a browser-specific header issue. IE 5.5 under Win98 seems to work ok here. The pathname for the file being uploaded is usually sent by most browsers as an additional attribute of the header(s) for the file; in recent Vortex versions this can be obtained with <varinfo>. I suspect IE is not sending the headers or MIME data correctly.

Try making the ACTION of the form point to a simple CGI program that just saves its entire input to a file (eg. a shell script), submit your form with the suspect browser, then examine the file for suspicious headers (or ones different than under a working browser). You can open a tech support ticket at Thunderstone with the contents of such a file for further examination.
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

Variable Contents in File Upload

Post by mark »

Also make sure you don't have a proxy in between messing up the data.
Kris@Kineta
Posts: 5
Joined: Wed Jan 16, 2002 4:52 pm

Variable Contents in File Upload

Post by Kris@Kineta »

I'm not sure if this is what you meant by the input generated for this, but here's what I have:

===== START ======

-----------------------------7d23020474
Content-Disposition: form-data; name="project"

3c2b63d9d
-----------------------------7d23020474
Content-Disposition: form-data; name="groupid"

3c45df6e3
-----------------------------7d23020474
Content-Disposition: form-data; name="infile"; filename="C:\boop\kristestssomemore\Knowledgist\actions.txt"
Content-Type: application/octet-stream


-----------------------------7d23020474
Content-Disposition: form-data; name="format"

KN
-----------------------------7d23020474--
Post Reply