Skip to main content
gamedev.net
🔒 Locked

[web] Uploading a folder

Started by krez Feb 17, 2009 at 3:04 PM 3 replies 1.9k views
Original Post
krez
krez
I need to allow users to upload a folder of files, and recursively upload sub-folders etc. This is not possible with normal HTML forms as far as I can tell. I could have the users put the folder and everything in it into a ZIP file and upload that, but this extra step might chase off potential users as it is not simple and easy. I could also write a small program that handles this, allowing them to pick the folder and upload it to my server. But a lot of people wouldn't want to install a program just to use a website (I would have doubts myself). I'm not sure if Flash or a Java applet can do such a thing (do either of these allow access to the local disk? I'm not sure if Flash has decent file handling either, I haven't played with it), but even so I imagine there are plenty of people who do not have Flash installed, and even fewer with Java. Does anyone have any great ideas that I am maybe missing? I would like a simple (from the user / usability perspective) solution so as to get the largest audience possible. I would be eternally grateful :)
--- krez ([email="krez_AT_optonline_DOT_net"]krez_AT_optonline_DOT_net[/email])
krez
krez
Well, although the lack of replies kind of sucks, at least I now know that this isn't some trivial problem that I just can't figure out myself.

--- krez ([email="krez_AT_optonline_DOT_net"]krez_AT_optonline_DOT_net[/email])
Erik Rufelt
Erik Rufelt
This can surely be done with Java, and probably with Flash, but I've never used it. It might depend on security settings, or force a "do you allow this?" message. It seems it can even be done with &#106avascript, so no applet is necessary.<br>Found this with <a href="http://www.google.com/">Google</a>: <a href="http://forums.devx.com/showthread.php?t=154299">http://forums.devx.com/showthread.php?t=154299</a>, the first reply lists a lot of sources.
acidwillburnyou
acidwillburnyou
You are correct, this cannot be done with pure HTML forms. Your choices are some clever Ajax, or more simply Flash of Java.
krez
krez
Thank you both!

Unfortunately the &#106avascript stuff seems to rely on ActiveX so it won't work outside of IE. I <em>might</em> be able to figure out some clever Ajax magic that works across browsers, but the real issue is that I want the users to be able to select a folder not just a list of files, which the little file dialogs don't seem to allow.<br/><br/>Guess I have to dig into Java applets (it's been a long while) and Flash.
--- krez ([email="krez_AT_optonline_DOT_net"]krez_AT_optonline_DOT_net[/email])

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.