Page 1 of 3

downloadaszip

Posted: Fri Dec 02, 2011 4:42 pm
by spartacus
Is there a size limitation for this api call - it seems to fail for directories containing large files (such as avi)

Regards,

Re: downloadaszip

Posted: Fri Dec 02, 2011 5:07 pm
by madhan
Yes. It is 500 MB.

Re: downloadaszip

Posted: Fri Dec 02, 2011 5:36 pm
by spartacus
thanks for the quick (unwanted) response :)

is there any way to compress and download larger files?

also: is there any way to start downloading from an arbitrary position in a file
e.g. in case transmission was interrupted.

Regards,

Re: downloadaszip

Posted: Fri Dec 02, 2011 6:15 pm
by madhan
is there any way to compress and download larger files?


Not currently. You can download without compressing.

also: is there any way to start downloading from an arbitrary position in a file
e.g. in case transmission was interrupted


Tonido fully supports HTTP Byte Range Support

Re: downloadaszip

Posted: Fri Dec 02, 2011 8:34 pm
by spartacus
does not seem to work:

request header:

Code: Select all

[ Request-Range ] = bytes 231291139-733943807/733943808


response header:

Code: Select all

[ Content-Range ] = bytes 0-733943807/733943808



BTW: using Action Script 3.0

Regards,

Re: downloadaszip

Posted: Fri Dec 02, 2011 8:57 pm
by spartacus
fixed:

Code: Select all

[ Range ] = bytes=393989147-733943807
[ Content-Range ] = bytes 393989147-733943807/733943808


guess that is what RFC is for... :)

Regards,

Re: downloadaszip

Posted: Sat Dec 03, 2011 7:08 pm
by spartacus
Well, no one said it would be easy...

Turns out, the correct HTTP Range header is:

Code: Select all

Range: bytes=0,xxxx


However, Action Script disallows the HTTP Range: header (among others). Fortunately,
Tonido accepted the header without the semicolon, so downloading partial content works.

Now, I'm trying to read the zip file, but getting 404 error.

I can't send an HTTP

Code: Select all

Accept-Encoding:gzip, deflate

header because it is also disallowed by Action Script.

Regards,

Re: downloadaszip

Posted: Sat Dec 03, 2011 8:43 pm
by spartacus
My bad:
un-retrieved zip files were accumulating in the directory - hit the 500Mb limit...

Regards,

Re: downloadaszip

Posted: Sun Dec 04, 2011 6:30 pm
by spartacus
It seems that when I try to downloadaszip immediately after getting the go-ahead from zipstatus, nothing is sent.

In the log, I see the downloadaszip request BEFORE tonido says compression finished, even though it was sent AFTER zipstatus returned result=1.

Is this normal? How long a delay is needed?

BTW: I AM checking that the directory size is < 500Mb. Is the limit on compressed or uncompressed size, and is there any api call to determine the directory size?

Regards,

Re: downloadaszip

Posted: Sun Dec 04, 2011 7:36 pm
by madhan
There should be no delay required. Please compare with Tonido UI's behavior using the log and firebug.

There is no call for getting size, you can getdirectorylist and compute the size from it.