J'upload
From browser upload applet
Dedicated servers

Find out how to get one of the best dedicated server hosting services available on the market. Have a 160GBytes transfer per month server for only $90 a month !
Get one and start reselling.
CALL NOW ! +1.(302)-213-1611
Shared hosting
Shared hosting service with certified bandwidth, your own IP addresses + SSL + CERT for the same site hosted on both sides of the ocean : YES ! GPL.Host makes it possible for less than $5.5/month !
Completly reviewed version 1.2.0 ! New features include browser's JVM detection code using a special test applet to send .cab or .jar depending on it. Now realy compatible with virtualy ALL browsers.

1. What is J'upload for ?
As you may know, a java applet is not supposed to access the files located on the browser computer, and its not supposed to connect to a site except the one that is providing the applet. For that reason, we need to sign the applet. This is done by asking Verisign for a certificate, which is nothing more that a key composed of few numbers. This simple file cost something like 20 bucks, and I don't want to give a cent to people at Verisign, who already have already enough money and do not provide the service they should. Make sure you NEVER have your domain whois hosted there, they have absolutely no technical knowledge about domain names, and their customer service is bad. This is a shame and I don't want to support that. Moreover, my code is left OPEN, which is enough proof that it won't attack your filesystem ! :)



All that to tell you that if you need to bypass those bloody security barriers, you have to sign an applet with a "test" certificat without any Verisign agreement. This is done by using either Microsoft's tools for signing the .cab file (targetting IE > v4) or using Sun's tool at http://java.sun.com for signing the .jar file.

There is a VERY big issue with IE5. In fact, if you do not install Sun's plugin, the browser cannot access signed .jar file, it only accepts signed .cab files. The only problem is that it is pretty hard to know what type of JVM is running without asking users. After many trials and error, I've finally ended up with a pretty weird solution.

  • 1 Use old <input type="file" tag under the <noscript> for non-javascript browser (works with links browser for example).
  • 2 Check if navigator.javaEnable is set. If not, fall back to old file form by writing the form with document.write()
  • 3 Check if running under IE by reading useragent. If so, check what type of JVM is used by calling a function of our test applet from javascript. If running MS JVM, then use <applet> tag and .cab files. Otherwise do like in 4.
  • 4 Java is enabled, and we are not in the case of MS, so we can use plain <object> tab with embbed info.
Last trick. If you are using IE without Sun's JVM, then applets won't be loaded before javascript executes. That's why I do a try{}catch(all){} loop to call one applet's method. When it succeeds, then it means the applet is loaded. That's a bit crazy but it works well!

It took me a LOT of time to find this information. I hope everybody enjoys reading it!