Hi, this is a pretty important question and I am really hoping someone out there has the experience dealing with uploading, to help me out with this.
Summary. I am developing an upload application that can let a user browse for a jpeg and upload it to be stored on the server. We built something using the javazoom upload bean however for some reason when we use dialup to test the uploading it takes a very long time for the post to complete. What I mean by this, is we setup a test page with just a very basic form.
FORM
---
<form name=form1 method=post action="uploadaction.jsp" enctype="multipart/form-da
ta">
<table width="60%" border="0" cellspacing="1" cellpadding="1" align="center">
<tr>
<td align="left">
<font size="-1" face="Verdana, Arial, Helvetica, sans-serif"><b>Select a file to upload:</b></font>
</td>
</tr>
<tr>
<td align="left">
<font size="-1" face="Verdana, Arial, Helvetica, sans-serif">
<input type="file" name="uploadFile" size="50">
</font>
</td>
</tr>
<tr>
<td align="left">
<font size="-1" face="Verdana, Arial, Helvetica, sans-serif">
<input type="submit" name="submit" value="Upload">
<input type="reset" name="Reset" value="Cancel">
</font>
</td>
</tr>
<tr>
<td align="left">
</td>
</tr>
</table>
</form>
---
uploadaction.jsp
---
<%
out.println("Hello World!");
%>
---
What is baffling me is that we put a blank jsp page as the action, for example, in the form above, uploadaction.jsp is just a blank jsp page with
'hello world' on it.
In our internal network, from a client computer, I browse and select a files of varying sizes, and the Post takes longer and longer for each file as they get bigger. However, nothing is being uploaded. I have tried this in IIS and it happens just about instantaneously.
Over dialup, specifically AOL, the time it takes to see the hello world message increases from 2-3 seconds (30kb)... to about 5 minutes (1.5MB). I don't understand why there is such a large time difference.
Can someone offer to me an explaination to as why these Multipart/Form-Data Posts are taking so long if supposedly nothing is being uploaded. Are there settings on the Tomcat side that could be causing these delays, the only i can think of is problems reading the headers.
Does someone have realworld experience on a project that needed to deal with this? I understand that dialup will be of course slow but how does everyone else do it?
Below are some of the requirements and notes on what we are trying to do.
Requirements
Efficiency and Optimization - ability to scale to 1000's of concurrent users
Progress Bar - ability to see percentage uploaded
Allow only - JPG files
Stop transfer of files over 2MB.
No client side applet or activex control, must be able to use native browser.
Concerns, I don't want some 20 malicious users all sending 2 Gig files and crashing the server, how do we avoid that?
Currently using Javazoom Upload Bean on Tomcat on Solaris 9 (x86)
Other setups tested with the same results.
Tomcat on Windows 2000
Resin on Solaris 9
Any help, comments, best practices, suggestion would be very appreciated.
THANKS.