Page 1 of 1

Directory specific uploader

Posted: 06 Jun 2011, 15:13
by DarkRanger
I'm looking for an uploader that will enable me to specify the directory that I want the files uploaded to. I was thinking about getting a java applet but can't find anything good...

Any ideas?

Re: Directory specific uploader

Posted: 06 Jun 2011, 15:22
by Ron2K
I'm going to assume that you're trying to do something like Photobucket, where you have a list of albums that users can upload photos to. Nothing terribly complicated about this, although it will be a bit of a slog.

First off, you'd have the physical parent folder saved in your config file. You could have a bit of code that reads off all the sub-folders (and their sub-folders too, if you want to allow unlimited nested levels and are comfortable working with tree structures - I have a C# tree class that I can attach if needed). You could also allow the user the option of creating new sub-folders and such.

Then, allow the user to select which folder to place into, and then the standard uploader UI. The uploader code should be intelligent enough to read which folder to upload to based on the user's selection, and upload the file to the correct place.

How exactly you go about this depends on not only which language you're using, but how your web pages are designed, and I can't give you any specific advice because of it. If C# is your poison, I can always code up a quick proof-of-concept solution (but you'll have to wait for the weekend due to my own time constraints).

Re: Directory specific uploader

Posted: 06 Jun 2011, 16:14
by DarkRanger
Thanks for the response Ron.

It's not albums, but it is much like Photobucket (the idea of specific folders).

What it is, is a Knowledge Management system where files and specifications can be uploaded for the company to use. My main coding is PHP with a touch of jQuery.

The only thing the uploader should be able to do is upload files and create new directories if need be. Directories will only be 3 levels deep maximum ( from the root directory ).

I can possibly code this using jQuery, but I'm damn lazy! :lol:

Edit: Or at least Google it! :D