Click to See Complete Forum and Search --> : Java Applet - Folder Uploader


bradgrafelman
02-14-2007, 12:34 AM
I’m designing a customized CMS and have hit a snag. It was all working out so well in my head, too…

The one thing I can’t seem to find easily right now is a free Java Applet (or possibly ActiveX, or ANYTHING at this point) that allows users to upload entire folders at a time. Basically, they’d be uploading a photo album, and there’s no way I’m going to make them browse for each individual file as they would in a normal “input type=’file’” element.

I really had hoped there would be something simple and free out there as I'm on a rather limited budget ($0). If my Java skills weren’t so darned rusty, I’d make it myself, but… well we won’t even go there.

bretticus
02-14-2007, 02:59 AM
Well, I couldn't make this work, but maybe you'll have better luck.

http://jupload.sourceforge.net/index.html

bradgrafelman
02-14-2007, 03:32 AM
Yeah... I couldn't get it to work either. Looks like it would've worked nicely, too. Here (http://bradg.njoe.com/upload2/) is my attempt... when it loads, I click the "Browse" button, but it does nothing.

NogDog
02-14-2007, 03:41 AM
I think any solution is going to require something that the user will have to install (ActiveX or whatever), as anything that could could read a directory on the client and then upload files from it without the user's explicit approval would be a pretty nasty security hole. Unfortunately, that's the extent of my knowledge. (I've never worked with ActiveX and only toyed with Java applets a bit.)

piersk
02-14-2007, 06:25 AM
Ok, my Java's not amazing either, but it seems that the reason that it's not working (from the yellow debug box underneath) is that it's not getting the correct permissions to look at the hard drive.

(quick java lesson from what i remember from when I was awake during my java lectures) The reason that Java is fairly secure is that it runs in its own "sandbox" and is not allowed access to the computer it's running on unless you give it specific permission to via policies. It seems that whoever wrote that applet hasn't allowed it the right permission (or read in this case... geddit?). If you go and have a look at this applet: http://www.radinks.com/upload/applet.php you'll notice that it actually asks you for permission.

Take a look at the README.txt (http://jupload.sourceforge.net/README.txt) file. It mentions something about self-signing the applet. Maybe try that.

I think any solution is going to require something that the user will have to install (ActiveX or whatever), as anything that could could read a directory on the client and then upload files from it without the user's explicit approval would be a pretty nasty security hole. Unfortunately, that's the extent of my knowledge. (I've never worked with ActiveX and only toyed with Java applets a bit.)

With regards to the security, Java is pretty secure (see my bit about the sandbox above) and will only be allowed access if the user allows it. Otherwise it won't read anything from the client's folders.

Yes work's slow this morning...

bradgrafelman
02-14-2007, 12:54 PM
Thanks for the tips guys.

This is only going to be used within a private LAN, so I really don't care if I don't find the perfect solution for the outside world - I can train the 3 or 4 people that will use this to click the "Always allow" box or whatever. If the permissions are in any way related to the internet zone the site is running in, I can force the site to be in the "trusted sites" zone, but I doubt that'll help.

Guess I have some more playing around to do still... :(

Elizabeth
02-20-2007, 08:33 AM
I came across this a while ago when I was looking for something else - I know it's not free, but it might be worth the $79 for you not to have to mess with it any more :)

http://www.javaatwork.com/