cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Grieve (JIRA)" <>
Subject [jira] [Created] (CB-2306) does not support file:/// URLs on Android
Date Tue, 29 Jan 2013 16:21:21 GMT
Andrew Grieve created CB-2306:

             Summary: does not support file:/// URLs on Android
                 Key: CB-2306
             Project: Apache Cordova
          Issue Type: Bug
          Components: Android
            Reporter: Andrew Grieve
            Assignee: Andrew Grieve
            Priority: Minor

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*', '', 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],

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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message