-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
File write, create, readAsText broken #464
Comments
Hopefully this PR will address |
@pgg the PR was merged and is now released, please update to v1.3.17 and let us know if you still have any issues. |
Now writeFile with boolean true only works if there is already a file. Also getting strange behaviour with other File operations all round, will test and log them asap, but I suggest an all round File operations sanity check/test . . . |
@ihadeed What is the correct way to read a text file? File.readAsText does not work . . . |
All readAsXXXX still having 'not Blob' error, i.e.: TypeError: Failed to execute 'readAsDataURL' on 'FileReader': parameter 1 is not of type 'Blob'. EDIT: #479 fixes this issue. |
Took a quick look in sources of It seems like things are messed here:
Hope it'll help to fix the issue. |
@pgg Can you try with the latest version v2.2.2 and report back if you still have any issue? Thanks. |
File.readAsText still don't work. It seems the promise will not complete forever. |
File writeFile, createFile replace as boolean value = true does not work. readAsText fails expecting a blob . . . I am trying to write a simple text file (that should be replaced every time) and read its contents back . . . ionic-native@1.3.16
This is the only way I could get it to work:
Write:
Read:
this.http.get(window['cordova'].file.dataDirectory + 'security.json').map(res => res.json().key);
The text was updated successfully, but these errors were encountered: