downloadaszip

Questions related to developing on the Tonido Platform
spartacus
Super Tonidoid
Super Tonidoid
Posts: 34
Joined: Wed Oct 20, 2010 1:39 pm

downloadaszip

Postby spartacus » Fri Dec 02, 2011 4:42 pm

Is there a size limitation for this api call - it seems to fail for directories containing large files (such as avi)

Regards,

User avatar
madhan
Admin Tonidoid
Admin Tonidoid
Posts: 8617
Joined: Tue Dec 30, 2008 12:13 am
Location: Austin, TX, USA
Contact:

Re: downloadaszip

Postby madhan » Fri Dec 02, 2011 5:07 pm

Yes. It is 500 MB.

spartacus
Super Tonidoid
Super Tonidoid
Posts: 34
Joined: Wed Oct 20, 2010 1:39 pm

Re: downloadaszip

Postby spartacus » Fri Dec 02, 2011 5:36 pm

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,

User avatar
madhan
Admin Tonidoid
Admin Tonidoid
Posts: 8617
Joined: Tue Dec 30, 2008 12:13 am
Location: Austin, TX, USA
Contact:

Re: downloadaszip

Postby madhan » Fri Dec 02, 2011 6:15 pm

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

spartacus
Super Tonidoid
Super Tonidoid
Posts: 34
Joined: Wed Oct 20, 2010 1:39 pm

Re: downloadaszip

Postby spartacus » Fri Dec 02, 2011 8:34 pm

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,

spartacus
Super Tonidoid
Super Tonidoid
Posts: 34
Joined: Wed Oct 20, 2010 1:39 pm

Re: downloadaszip

Postby spartacus » Fri Dec 02, 2011 8:57 pm

fixed:

Code: Select all

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


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

Regards,

spartacus
Super Tonidoid
Super Tonidoid
Posts: 34
Joined: Wed Oct 20, 2010 1:39 pm

Re: downloadaszip

Postby spartacus » Sat Dec 03, 2011 7:08 pm

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,

spartacus
Super Tonidoid
Super Tonidoid
Posts: 34
Joined: Wed Oct 20, 2010 1:39 pm

Re: downloadaszip

Postby spartacus » Sat Dec 03, 2011 8:43 pm

My bad:
un-retrieved zip files were accumulating in the directory - hit the 500Mb limit...

Regards,

spartacus
Super Tonidoid
Super Tonidoid
Posts: 34
Joined: Wed Oct 20, 2010 1:39 pm

Re: downloadaszip

Postby spartacus » Sun Dec 04, 2011 6:30 pm

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,

User avatar
madhan
Admin Tonidoid
Admin Tonidoid
Posts: 8617
Joined: Tue Dec 30, 2008 12:13 am
Location: Austin, TX, USA
Contact:

Re: downloadaszip

Postby madhan » Sun Dec 04, 2011 7:36 pm

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.


Return to “Tonido Platform Development”

Who is online

Users browsing this forum: No registered users and 4 guests