Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-1381] Android: Buffer Large XHR Downloads

GitHub Issuen/a
TypeNew Feature
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:56:01.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.5.0
ComponentsAndroid
Labelsandroid, buffer, feature, xhr
ReporterDon Thorp
AssigneeMarshall Culpepper
Created2011-04-15T02:50:53.000+0000
Updated2011-04-17T01:56:01.000+0000

Description

It's currently not possible to download a file larger than an application's remaining memory. Add a tiapp.xml configurable property to set the size in bytes when incoming data should be moved to a file vs stored in memory.

<property name="ti.android.httpclient.buffer.to.file.threshold" type="int">1000000</property>

This property should be namespaced by platform to allow for different limits on different platforms.

When this limit is reached open a temporary file and flush the existing data and append any additional data to the file instead of in memory.

Comments

  1. Burggraf 2011-04-15

    Any word on this yet?

  2. Biztactix 2011-04-15

    Can we get this Bumped I've got an App Waiting on it. I don't want it to fall over later when people release larger files for download.

  3. Biztactix 2011-04-15

    Thinking about this, Perhaps this could be a download function as well, Give the HTTPClient a link and a path to save to. Direct Download to a file.

  4. Don Thorp 2011-04-15

    I've bumped the priority we'll try and get it worked in. There is still a lot going on for 1.5.

  5. Biztactix 2011-04-15

    Thanks,
    A dedicated file Download HTTP function would be very useful for a myriad of apps.
    I'm hoping our client will approve the app with streaming functionality only for now, And we'll add download after 1.5

  6. Burggraf 2011-04-15

    This continues to be a very high priority for us as well.

  7. Marshall Culpepper 2011-04-15

    See also the KitchenSink failure that this causes: #1297

  8. Kai Pradel 2011-04-15

    Bump - this is also a huge issue for our next iPad release. This issue seems to affect all platforms.

  9. Damien Elmes 2011-04-15

    Adding an iOS tag as it's an issue on both platforms. The ability to tell an xhr request to save to a local file would be great.

  10. Don Thorp 2011-04-15

    Damien, we maintain separate tickets for each platform. Please feel free to open a ticket for iOS and reference this ticket. Assign that ticket to Ralf please.

  11. Damien Elmes 2011-04-15

    Sorry about that. New ticket created at https://appcelerator.lighthouseapp.com/projects/32238-titanium-mobile/tickets/2281-ios-option-to-download-directly-to-a-file"> https://appcelerator.lighthouseapp.com/projects/32238-titanium-mobi...

  12. Marshall Culpepper 2011-04-15

    (from [2fa41c0ea6a442fbe6708590be130ed7f42e67b9]) fixed a redirect issue when some http servers don't correctly escape the redirect url. implemented buffering for httpclient (512k is the default, can be controlled w/ ti.android.httpclient.maxbuffersize property). added a new drillbit test suite for httpclient, fixed headers/formatting in a few files. [#1381 state:fixed-in-qa] [#2156 state:fixed-in-qa] https://github.com/appcelerator/titanium_mobile/commit/2fa41c0ea6a442fbe6708590be130ed7f42e67b9"> https://github.com/appcelerator/titanium_mobile/commit/2fa41c0ea6a4...

  13. Thomas Huelbert 2011-04-15

    1.5.0.3ee6a97

JSON Source