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/15 02:16:45 UTC

[GitHub] [cordova-plugin-file] knight9999 opened a new pull request #301: [WIP] support safari private browsing. use json instead of blob

knight9999 opened a new pull request #301: [WIP] support safari private browsing. use json instead of blob
URL: https://github.com/apache/cordova-plugin-file/pull/301
 
 
   
   ### Platforms affected
   cordova-browser 
   
   ### Motivation and Context
   Bascially cordova-browser uses indexeddb. in order to store File(Blob) object as file-save.
   However the private browsing mode on safari browser in mac does not permit storing
   File(Blob) object into the indexeddb.
   (See Webkit source code https://github.com/WebKit/webkit/blob/5dada1bf8d706e1c544f1a23bfb67f3eaeb4f412/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp#L328-L331 )
   This PR is to fix this issue.
   
   ### Description
   The private borwsing mode on safari throw `DataCloneError` when storing Blob object to indexeddb.
   Therefore this detects `DataCloneError` and store base64 encoded text instead of Blob object itself.
   According to this, decoding/encoding helper functions are introduced.
   
   
   ### Testing
   <!-- Please describe in detail how you tested your changes. -->
   
   
   
   ### Checklist
   
   - [ ] 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