File system access: resolveLocalFileSystemURL fires FileError 5


Hi All,

I need to download large video files and play them in future. We ported app from Cordova and everything works well except file system access, as we are starting app as file://.

So, the following simple test:

<!DOCTYPE html>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
    <title>FS Test</title>
        dataDirectory = "filesystem:file:///C:/temp/";
        window.webkitResolveLocalFileSystemURL(dataDirectory, function(directoryEntry) {
        function (e) {

fires an error:

code: 5
message: "A URI supplied to the API was malformed, or the resulting Data URL has exceeded the URL length limitations for Data URLs."
name: "EncodingError"
__proto__: FileError

Please advise.


What if you use dataDirectory = "file:///C:/temp/"; instead?


Also does not work. I wanted to detect application directory for different platforms myself.
However, the following solutions works perfectly, and I hacked Cordova FileTransfer plugin to match the example below:

    window.webkitRequestFileSystem(window.PERSISTENT, 100500*1024*1024, function() {
        dataDirectory = "filesystem:file:///persistent/";
        window.webkitResolveLocalFileSystemURL(dataDirectory, function(directoryEntry) {
            console.log('success', directoryEntry);
        function (e) {
    function (e) {