cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tony Leung (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-7862) FileReader reads large files in a single chunk causing OOM exceptions
Date Thu, 11 Aug 2016 19:49:20 GMT

    [ https://issues.apache.org/jira/browse/CB-7862?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15417828#comment-15417828
] 

Tony Leung commented on CB-7862:
--------------------------------

Now that the chunk size is - FileReader.READ_CHUNK_SIZE = 256*1024;

I found a bug on iOS that readAsDataURL in CDVFile.m, converting it to Base64 will not work
because the chunk size 262144 is not dividable by 3.

The quick fix will be FileReader.READ_CHUNK_SIZE = (256*1024) - 1
Should I open a bug for that?

> FileReader reads large files in a single chunk causing OOM exceptions
> ---------------------------------------------------------------------
>
>                 Key: CB-7862
>                 URL: https://issues.apache.org/jira/browse/CB-7862
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin File
>    Affects Versions: 4.0.0
>         Environment: Android
>            Reporter: shenzhuxi
>            Assignee: Jason Ginchereau
>            Priority: Critical
>
> In Android, I tried to copy a 14MB file from html file input with org.apache.cordova.file
1.3.1. The App crashed and a 0 byte file was copied. 
> I use http://ngcordova.com/ and here is my code https://github.com/shenzhuxi/readiator/blob/master/src/js/cordova-index.js.




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message