[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
File Upload problems
I am attempting to create a file upload field. The following code does NOT
work:
<form action="[process-target]" method="POST" enctype="multipart/form-data">
<INPUT TYPE=hidden NAME=mv_todo VALUE="return">
<INPUT TYPE=hidden NAME=mv_nextpage VALUE="@@MV_PAGE@@">
<input type=hidden name=cs_where value="html/images/bg">
<INPUT TYPE=file NAME="cs_fimage"> <INPUT TYPE=submit VALUE="Upload"><br>
</FORM>
The browser ignors the method="POST" and attempts to send the entire thing
to Minivend in the URL. If the attachment is being sent at all, Minivend
is ignoring it. It is possible that the browser is seeing the ? in the
Minivend URL to "process", and then interpreting it as a GET rather than
POST. Is there any way to have Minivend not place the ?SESSIONID on the
end of URL's. Since I am requiring cookies be enabled (this is only used
in the admin section of the site), the sessionID isn't really necesary and
stops otherwise static pages from being cached.
--
After lots of experimentation, I stumbled on the fact that the following
code _DOES_ work. Note that all I've done is defined a first, dummy form
that never gets executed:
<form action="[process-target]" method="POST" enctype="multipart/form-data">
<INPUT TYPE=hidden NAME=mv_todo VALUE="return">
<INPUT TYPE=hidden NAME=mv_nextpage VALUE="@@MV_PAGE@@">
<input type=hidden name=cs_where value="html/images/bg">
<!-- <INPUT TYPE=file NAME="cs_fimage"> <INPUT TYPE=submit VALUE="Upload"> -->
</FORM>
<form action="[process-target]" method="POST" enctype="multipart/form-data">
<INPUT TYPE=hidden NAME=mv_todo VALUE="return">
<INPUT TYPE=hidden NAME=mv_nextpage VALUE="@@MV_PAGE@@">
<input type=hidden name=cs_where value="html/images/bg">
<INPUT TYPE=file NAME="cs_fimage"> <INPUT TYPE=submit VALUE="Upload"><br>
</form>
I haven't had time to see how much I can cut out (maybe only the FORM is
needed to "fool" the browsers) I notice the same behaviour on IE 5 and NS
4.5.
Has anyone encountered a similar problem / know of a fix or workaround? I
really don't understand this one.
Nick