Page 1 of 1

Downloading folders recursively

Posted: Fri Sep 14, 2012 1:05 pm
by vlad
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

Re: Downloading folders recursively

Posted: Fri Sep 14, 2012 7:07 pm
by support
What did you have in "itemi" applet parameters?

Re: Downloading folders recursively

Posted: Mon Sep 17, 2012 11:11 am
by vlad
Only one parameter <PARAM NAME="item1" VALUE="files">, that is supposed to be the root of the folder that needs to be downloaded.

Re: Downloading folders recursively

Posted: Mon Sep 17, 2012 7:08 pm
by vlad
(looking forward to receiving some assistance with this, as I am interested in purchasing a license for this applet)

Re: Downloading folders recursively

Posted: Wed Sep 19, 2012 6:35 pm
by support
and if you try:
<PARAM NAME="item1" VALUE="files/">

Re: Downloading folders recursively

Posted: Thu Sep 20, 2012 8:22 am
by vlad
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.

Re: Downloading folders recursively

Posted: Thu Sep 20, 2012 8:25 am
by vlad
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.

Re: Downloading folders recursively

Posted: Thu Sep 20, 2012 9:21 am
by vlad
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/"?

Re: Downloading folders recursively

Posted: Fri Sep 21, 2012 6:33 am
by support
Really? I'm going to check it.