Bernhard Bezdek created CB-1228:
-----------------------------------

             Summary: Read File never executes callback onloadend in iOS 6
                 Key: CB-1228
                 URL: https://issues.apache.org/jira/browse/CB-1228
             Project: Apache Cordova
          Issue Type: Bug
          Components: iOS
    Affects Versions: 2.0.0, 1.7.0
         Environment: iOS 6 Simulator and installed on a device wit the iOS6 
Beta installed on
            Reporter: Bernhard Bezdek
            Assignee: Shazron Abdullah


File APi from Website doesen't work on iOS6 if I want to Read a file (text).
This is my modified Version which is working fine on iOS lower Version 6
function getFile(sFileName, oCallback) {

window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, function(fileSystem) {
                fileSystem.root.getFile(sFileName, {
                        create : true
                }, function(fileEntry) {
                        fileEntry.file(function(file) {
                                var reader = new FileReader();

                                reader.onloadend = function(evt) {
                                        alert('READ FILE')
                                        window[oCallback](evt.target.result, 
sFileName);
                                };
                                
                                reader.readAsText(file); // callback never 
executed
                                
                        }, function(error) {
                                alert('Error C')
                        });
                }, function() {
                        alert('Error B')
                });
        }, function(error) {
                alert('Error A')
        });
}


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to