cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <>
Subject [jira] [Commented] (CB-11699) FileReader.READ_CHUNK_SIZE is not working with Base64 conversion
Date Mon, 22 Aug 2016 08:55:21 GMT


ASF subversion and git services commented on CB-11699:

Commit 3bc49455963e873af457a440ea240d5422d01865 in cordova-plugin-file's branch refs/heads/master
from [~vladimir.kotikov]
[;h=3bc4945 ]

CB-11699 Read files as Data URLs properly

When reading file as Data URL, CHUNK_SIZE must be divisible by 3,
otherwise the resultant string made by concatenating chunks will
not be a valid Base64 encoded Data URL.

Also Windows do not support reading sliced files as data URLs, so we
set chunk size equal to file size

> FileReader.READ_CHUNK_SIZE is not working with Base64 conversion
> ----------------------------------------------------------------
>                 Key: CB-11699
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin File
>    Affects Versions: 4.2.0
>         Environment: Bug in JavaScript so all platforms will be affected
>            Reporter: Tony Leung
>            Assignee: Vladimir Kotikov
>              Labels: reproduced, triaged
> CB-7862 - the fix for reading files in chunks defined the chunk size as follow:
> 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

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message