• Post Reply Bookmark Topic Watch Topic
  • New Topic

File Upload Question  RSS feed

 
Nathan Cannon
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is considered to be the standard for uploading images (jpg). We have a J2EE application running struts with the FileUpload package from Apache. This works in most situations, but we have found that large images ( > 2 MB) from remote distance (Europe, Australia) that we get several failed uploads. We are looking at changing how much data we read at a time (currently 8196 bytes), but that still wouldn't solve the problem of losing connection. Is there a more reliable standard that maybe would even support a reconnect feature. Any help or direction would be appreciated.

nathan
 
Joe Ess
Bartender
Posts: 9426
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My first thought is that you have network problems. How reliable are remote connections using other protocols (i.e. ssh, ftp)? What is the difference in file transfer time between US locations and your more remote places? Can you transfer large files with other protocols? If the program works for a small file (more than 16k), it should work for everything. The only difference is transfer time.
The Apache Project is the gold standard in the open source community. Most of the web servers on the internet are the Apache http server. Tomcat, the Apache Java Servlet container, is considered by Sun to be the reference implementation of the Servlet standard. IBM recently open-sourced a Java SQL Server, Cloudscape, as Apache Derby. This is not to say there won't be problems with software with the Apache label, but that their standards are high. If the network isn't the problem, try checking the mailing lists for existing issues.
 
Nathan Cannon
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The network was my first thought also, but I have no proof that I can go to I.T. with. They simply say, it is a coding issue. Currently our clients are only using http so again, I don't have an avenue for building any reliable information that I.T. would accept. Currently, I have been instructed to look into wrapping the FileUpload in some type of mechanism for auto-resume upon a failure. Wouldn't that have to be built into the client side via an ActiveX component or something. I can't force an upload to continue/retry from the server, can I.
 
Joe Ess
Bartender
Posts: 9426
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Nathan Cannon:
I don't have an avenue for building any reliable information that I.T. would accept.

You say that distant clients have problems. I assume that nearby clients do not? If they don't the problem isn't with the code.*
Do you have remote locations that can run test scenarios for you? It would be interesting to write an applet which would keep a connection alive and report when the connection dies. Maybe do some throughput testing by sending a small data sample and comparing the location vs the speed. If you have trouble keeping a connection longer than X minutes but a file upload would take longer, there's your problem.
As for an auto-resume, yea, you'd need to put something on the client side, like an applet, which could reconnect and pick up where it left off.

*assuming your code isn't coded to wait an hour and close a connection or something of that nature that you haven't clued us into.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!