Downloading folders recursively

Files and folders downloader add-on with resume support.

Downloading folders recursively

Postby vlad » Fri Sep 14, 2012 1:05 pm

Hi,

I am trying to make the applet download a folder with all the contained files and subfolders. I have "relativefilename" set to "true" and "folderdepth" set to "-1".
The applet makes a "cmd=list" request and my server-side script lists the following:
Code: Select all
<pre>
file 1347446132 3968471 60105e-r5-DA40-D-AFM.pdf<br>
folder 1347468769 4096 Unzipped Files<br>
</pre>

The first item, the file, gets downloaded properly. However, for the second item, the subfolder, it doesn't seem to take into account that it is a folder and it makes the same "cmd=download" request. Please let me know how do I make it list its contents, download the files, etc..? I don't seem to figure that out from the included PHP example script.

Thank you,

Vlad
vlad
 
Posts: 82
Joined: Sun Jan 04, 2009 6:38 pm

Re: Downloading folders recursively

Postby support » Fri Sep 14, 2012 7:07 pm

What did you have in "itemi" applet parameters?
User avatar
support
 
Posts: 1501
Joined: Sun Jan 27, 2008 6:19 pm

Re: Downloading folders recursively

Postby vlad » Mon Sep 17, 2012 11:11 am

Only one parameter <PARAM NAME="item1" VALUE="files">, that is supposed to be the root of the folder that needs to be downloaded.
vlad
 
Posts: 82
Joined: Sun Jan 04, 2009 6:38 pm

Re: Downloading folders recursively

Postby vlad » Mon Sep 17, 2012 7:08 pm

(looking forward to receiving some assistance with this, as I am interested in purchasing a license for this applet)
vlad
 
Posts: 82
Joined: Sun Jan 04, 2009 6:38 pm

Re: Downloading folders recursively

Postby support » Wed Sep 19, 2012 6:35 pm

and if you try:
<PARAM NAME="item1" VALUE="files/">
User avatar
support
 
Posts: 1501
Joined: Sun Jan 27, 2008 6:19 pm

Re: Downloading folders recursively

Postby vlad » Thu Sep 20, 2012 8:22 am

Same output. The problem is that the applet doesn't seem to care that in the list of files, some items start with "folder" instead of "file" and it is making the following request:
Code: Select all
[POST] => Array
        (
            [cmd] => download
            [val1] => /files/a/
        )

Instead of using "cmd=list" it is using "cmd=download" for folders and of course that fails.
vlad
 
Posts: 82
Joined: Sun Jan 04, 2009 6:38 pm

Re: Downloading folders recursively

Postby vlad » Thu Sep 20, 2012 8:25 am

Nevermind. I found the problem. The line for a folder was supposed to start with "dir" not "folder". My silly mistake, sorry about that. Thank you nevertheless for the support.
vlad
 
Posts: 82
Joined: Sun Jan 04, 2009 6:38 pm

Re: Downloading folders recursively

Postby vlad » Thu Sep 20, 2012 9:21 am

Another question. Can I make the applet skip checking the existance of the requested folder inside "/".
Everytime I choose the location for the downloaded files, the applet makes a request to the server with "cmd=list" and "val1=/", even though my param is set to "<PARAM NAME="item1" VALUE="/some/path/of/mine/">". How can I make the applet start with "cmd=list" and "val1=/some/path/of/mine/"?
vlad
 
Posts: 82
Joined: Sun Jan 04, 2009 6:38 pm

Re: Downloading folders recursively

Postby support » Fri Sep 21, 2012 6:33 am

Really? I'm going to check it.
User avatar
support
 
Posts: 1501
Joined: Sun Jan 27, 2008 6:19 pm


Return to JFileDownload



cron

Sitemap | Privacy Statement | Java and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc.
in the U.S. and other countries. All other company and/or product names are the property of their respective owners.