You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2021/12/22 12:23:00 UTC

[GitHub] [cordova-plugin-file] nagdevbharat commented on issue #426: Storage updates in Android 11

nagdevbharat commented on issue #426:
URL: https://github.com/apache/cordova-plugin-file/issues/426#issuecomment-999537714


   I am trying to write file using following code:
   ```javascript
   this.file.checkDir(this.directorypath, 'AppFolder').then((dirExists) => {
           this.file.writeFile(this.downloadDirectory, update_file + '.'+saveExtention, fileData, { replace: true }).then((fileEntry) => {
             let mimeTestType = mimeType;
             let path = fileEntry.nativeURL
             this.openingFile(path, mimeTestType)
             resolve(true)
           }).catch((ex) => {
             resolve(true)
               console.error('Error')
           })
         }, (response) => {
           this.file.createDir(this.directorypath, 'AppFolder', true).then((response) => {
             this.file.writeFile(this.downloadDirectory, update_file + '.'+saveExtention, fileData, { replace: true }).then((fileEntry) => {
               let mimeTestType = mimeType;
               let path = fileEntry.nativeURL
               this.openingFile(path, mimeTestType)
               resolve(true)
             }).catch((ex) => {
               resolve(true)
               console.error('Error')
             })
           })
         })
         });
   ```
   This works till android 10 but not in android 11, it throws error.


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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