• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

upload redirect to error page

 
grace chow
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using SmartUpload to upload file, the smartupload code are contained in uploadEngine.jsp . I am wondering if the unstable submit is due to ENCTYPE="multipart/form-data.. thanks your kind attention

function SaveForm() {

if(validate())
{

document.form2.mode.value = "save";
document.form2.action = "uploadEngine.jsp";
document.form2.submit();
}
}

<form name="form2" method="post" action="" class="form" ENCTYPE="multipart/form-data">

<table>


<tr>
<td class="Arial10" colspan="2">
</p>
<input type="file" name="upfile">
</td>
</tr>


<tr>
<td width="20%"> <input type="button" name="Save" value="Save" onKlick="SaveForm()">

</td>
<td width="80%">&nbsp;

</td>
</tr>



</table>
</form>



Dear,
I have use the Post form to upload something by JSP. However, the upload is sometimes done successfully, sometimes the upload is NOT successful and redirect to another error page. Is there anyone have experience of having this problem. It is difficult to solve problem sometimes ok and sometimes not ok!!

[ October 25, 2004: Message edited by: grace chow ]
[ October 25, 2004: Message edited by: grace chow ]
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the multipart/form-data is required for file uploading.
You say sometimes it works, sometimes it doesn't. Are you using the O'Reilly upload code? Not sure if they updated it, but when I last used it, it had hardcoded file size and connection timeout limits. We had code that worked perfectly in the office and failed about 50% in production due to timeouts. I think it was a bit hard to chase due to poor exception reporting.

Hope this helps,
Dave
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how abour jakarta commons project??
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic