cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-9837) Add data URI support to file-transfer upload on iOS
Date Wed, 09 Dec 2015 16:39:11 GMT

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

ASF GitHub Bot commented on CB-9837:
------------------------------------

GitHub user daserge opened a pull request:

    https://github.com/apache/cordova-labs/pull/11

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

    Increases direct upload limit to the test image size
    
    [Jira issue](https://issues.apache.org/jira/browse/CB-9837)

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/daserge/cordova-labs cordova-filetransfer

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-labs/pull/11.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #11
    
----
commit cf3dc1a462cd2245a216f5a54155ea4f93278122
Author: daserge <v-seshak@microsoft.com>
Date:   2015-12-09T16:33:41Z

    CB-9837 Add data URI support to file-transfer upload on iOS
    
    Increases direct upload limit to the test image size

----


> Add data URI support to file-transfer upload on iOS
> ---------------------------------------------------
>
>                 Key: CB-9837
>                 URL: https://issues.apache.org/jira/browse/CB-9837
>             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
(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