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-9837) Add data URI support to file-transfer upload on iOS
Date Mon, 14 Dec 2015 14:06:46 GMT


ASF subversion and git services commented on CB-9837:

Commit 182b0c5ebebd8c0d313c676de0f92b8a56a81cb1 in cordova-plugin-file-transfer's branch refs/heads/master
from [~daserge]
[;h=182b0c5 ]

CB-9837 Add data URI support to file-transfer upload on iOS

Adds iOS and Windows implementation; mention in the docs
Adds corresponding tests
Increases spec.35 timeout for Windows Phone 8.1 case as it contains 2 download operations

> Add data URI support to file-transfer upload on iOS
> ---------------------------------------------------
>                 Key: CB-9837
>                 URL:
>             Project: Apache Cordova
>          Issue Type: New Feature
>          Components: Plugin File Transfer
>            Reporter: Juan Antonio
>              Labels: ios, reproduced, triaged
> When I send an encoded base64 string image from iOS device with 'data:image/jpeg;base64,'
at the beginning of data image on ft.upload(fileURL...) , plugin file transfer crash. However,
on android works perfectly ONLY if line 'data:image/jpeg;base64,' is present.
> Possible solution:
> If I delete string data 'data:image/jpeg;base64,' for iOS devices and modify plugin file
iOS 'CDVFileTransfer.m' like this:
> - (void)fileDataForUploadCommand:(CDVInvokedUrlCommand*)command
> {
>     NSString* source = (NSString*)[command argumentAtIndex:0];
>     NSData *fileData = [[NSData alloc] initWithBase64EncodedString:source options:NSDataBase64DecodingIgnoreUnknownCharacters];
>     [self uploadData:fileData command:command];
> }
> works perfectly, but it wouldn't accept image path, only base64 string encoded images.
> Thanks.

This message was sent by Atlassian JIRA

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

View raw message