cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Shakhnazarov (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CB-2306) FileTransfer.download does not support file:/// URLs on Android
Date Thu, 29 Oct 2015 09:55:27 GMT

     [ https://issues.apache.org/jira/browse/CB-2306?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Sergey Shakhnazarov updated CB-2306:
------------------------------------
    Component/s:     (was: Android)

> FileTransfer.download does not support file:/// URLs on Android
> ---------------------------------------------------------------
>
>                 Key: CB-2306
>                 URL: https://issues.apache.org/jira/browse/CB-2306
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin File Transfer
>            Reporter: Andrew Grieve
>            Assignee: Ian Clelland
>            Priority: Minor
>              Labels: triaged
>
> This was recently fixed for iOS. Likely what users want here is to use the Entry.copyTo
API instead, but some have tried this, so it's worth reporting.
> I started on a fix for this by mapping it to copyTo on the JS side:
>     argscheck.checkArgs('ssFF*', 'FileTransfer.download', arguments);
>     // Convert transfers from file:/// into File.copyTo calls.
>     if ('' + (/^.*?:/.exec(source)) == 'file:') {
>         var parts = /(.*)\/(.*?)$/.exec(target);
>         exec(successCallback, errorCallback, "File", "copyTo", [source.slice(7), parts[1],
parts[2]]);
>         return;
>     }
> This still failed the mobile spec test though due to /android_asset/ paths not being
resolved on the native side. We may want to add /android_asset/ resolution into resolveLocalFileSystemURI
as well...



--
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