You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2019/03/06 02:55:55 UTC

[GitHub] [cordova-plugin-file] knight9999 opened a new pull request #298: fix readAsArrayBuffer to use openSequentialReadAsync

knight9999 opened a new pull request #298: fix readAsArrayBuffer to use openSequentialReadAsync
URL: https://github.com/apache/cordova-plugin-file/pull/298
 
 
   
   ### Platforms affected
   cordova-windows
   
   
   ### Motivation and Context
   Before this PR, readAsArrayBuffer does not work on windows 10.
   This is because xhr fails with empty error.
   Indeed some specs in tests fail as
   ![2019-03-06 11 17 22](https://user-images.githubusercontent.com/5112183/53852577-d8edfb80-4005-11e9-84ec-22eb55acbd2c.png)
   
   This PR is to fix this issue.
   
   ### Description
   
   Instead of using `MSApp.createFileFromStorageFile`, `URL.createObjectURL` and `XMLHttpRequest`, I used `Windows.Storage.Streams.DataReader` which is a standard method for reading binary files.
   
   ### Testing
   With the help of cordova-mobile-spec, I confirmed all tests pass in cordova-plugin-file-tests.tests on Windows 10 PRO 1809.
   
   ### Checklist
   
   - [x] I've run the tests to see all new and existing tests pass
   - [ ] I added automated test coverage as appropriate for this change
   - [ ] Commit is prefixed with `(platform)` if this change only applies to one platform (e.g. `(android)`)
   - [ ] If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct [keyword to close issues using keywords](https://help.github.com/articles/closing-issues-using-keywords/))
   - [ ] I've updated the documentation if necessary
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org