• Post Reply Bookmark Topic Watch Topic
  • New Topic

It's before, but I'll ask again... Multiple File Upload

 
Jeff Grant
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Alright, so I have done some searching (on both JavaRanch and the net) about multiple file uploads but haven't found any that pertained to what I am looking to do. (saw Oriley's servlet package and toyed with it some.. but no dice for the functionality I need)
I have developed a file system written in JSP using Oracle 9i for a server. Currently, it has a single file upload form field which the user can select one file, click upload, and have the file placed in it's appropriate folder. However, the customer would like to be able to upload an entire directory structure (files included) at one time so they can set it and forget it... preferably in a drag and drop format.
I have seen that Oracle's IFS has a drag and drop upload ability via a pop-up FTP window which allows this to be done. That style would be great, port access is not an issue as I will open any port required.
I suggested to the customer that they could simply zip up the directory structure and I could have a link which would unzip it for them and expand it, but they suggested that others in their company might not be able to handle this responsibility. :roll:
I am posting this in the Servlet forum because I expect that it would require a Servlet to be handled in an easier manner.
I look foreward to anyone's input on this situation. I have read many posts in my searches where people just say "nope, not possible" but since I have seen the FTP window with IFS, I know it is possible.. just, in that case, not in a simple HTML page.
I attempted creating an FTP account and just linked with that... would this be my best solution? It did not work for me as my FTP server was not accepting uploads at that time.. but I could tweak it to make it work. Then I would have to have my administration section of my file system also create FTP accounts.
Let me know, thanks!
 
Tim Holloway
Bartender
Posts: 18417
60
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually I think the hard part (Java-wise) is on the client end, since clients are generally, uh, "discouraged" from local file access.
I don't think what you call a "file system" is quite what we'd formally call a file system, but I hope I can interpret your needs OK.
There are some GUI FTP apps for Windows (and for that matter for Linux) that can handle that if Java doesn't need to be part of the picture.
On the other hand, if you're trying to do something like shovel directories of files into BLOBs in an Oracle database, then that's not what you need.
A signed applet can drag-n-drop file folders and/or support selecting a directory from the standard file dialog in conjunction with file content copying. Mind you, the Java standard file dialog is just as non-intuititive when it comes to selecting directories as its counterparts on many OS's (including Windows) and languages, but the ability is there.
So one thing you can do is implement an applet that shoves the data over via HTTP tunnelling requests (one request per file) in response made to selection(s) on its GUI.
 
Jeff Grant
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Tim Holloway:
I don't think what you call a "file system" is quite what we'd formally call a file system, but I hope I can interpret your needs OK..

What I mean is my home grown file system using java.io.* and querying the directory structure I request. Allowing uploading, deletion, manual folder creation, etc..
There are some GUI FTP apps for Windows (and for that matter for Linux) that can handle that if Java doesn't need to be part of the picture.

Are there any free versions of this which I could test out? It would need to accept user login parameters and default folder.
On the other hand, if you're trying to do something like shovel directories of files into BLOBs in an Oracle database, then that's not what you need.

It's straight into a NTFS file system, not a database like on IFS.
A signed applet can drag-n-drop file folders and/or support selecting a directory from the standard file dialog in conjunction with file content copying. Mind you, the Java standard file dialog is just as non-intuititive when it comes to selecting directories as its counterparts on many OS's (including Windows) and languages, but the ability is there.

I used to be pretty decent with normal Java but never really ventured into Applets (went the JSP route instead as a standard HTML GUI was acceptable for the projects I have done). Could you give a couple of file types of panes I'd have to add to an Applet for drag and drop ability? I'm sure I can research this if you suggest it is the best way to go.
So one thing you can do is implement an applet that shoves the data over via HTTP tunnelling requests (one request per file) in response made to selection(s) on its GUI.

I have heard of HTTP Tunneling over the years but searching on the net (and here) only brings up references to books you have to buy or questions with answers which don't pertain to the very basics. Perhaps I need to go to the book store and find one on this.
There is no simpler HTML way to do this though? Anyone know how Oracle's IFS does their drag and drop FTP window?
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The COS website makes mention of this applet: http://www.infomentum.com/appletfile/

I'd be highly suspicious of the IFS being anything but a signed applet. If it's truly drag and drop, then it almost has to be, doesn't it ?
 
Jeff Grant
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Mike Curwen:
I'd be highly suspicious of the IFS being anything but a signed applet. If it's truly drag and drop, then it almost has to be, doesn't it ?

Does anyone know of a company which offers these (free or purchase) so I do not have to write one?
 
Phil Chuang
Ranch Hand
Posts: 251
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might want to check out http://jakarta.apache.org/commons/fileupload/ for their file upload implentation, it's robust and I'm pretty sure it can handle multiple files per form.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!