Skip to content
This repository was archived by the owner on Nov 9, 2021. It is now read-only.
This repository was archived by the owner on Nov 9, 2021. It is now read-only.

[Blocker] resolveNativePath is failing in android 11 #76

@sahalshn

Description

@sahalshn
cordova-plugin-filechooser 1.2.0 "File Chooser"
cordova-plugin-filepath 1.6.0 "cordova-plugin-filepath"

Unable to read file native path in android 11. This is only happening for files that are uploaded from the download folder.

this.fileChooser.open()
        .then(uri => {
          let pdfname = uri.substring(uri.lastIndexOf("/") + 1);
          let pdfExt = pdfname.substr(pdfname.lastIndexOf('.') + 1);
          if (pdfExt == 'pdf') {
            // let name = pdfname.split('.').slice(0, -1).join('.');
            this.processPDF(uri, '');
          }
          else {
            this.filePath.resolveNativePath(uri)
              .then(file => {
                let filename = file.substring(file.lastIndexOf("/") + 1);
                let fileExt = filename.substr(filename.lastIndexOf('.') + 1);
                if (fileExt == 'pdf') {
                  
                }
               
              })
              .catch(err => {
                // Here err is {code: 0, message: 'Unable to resolve filesystem path. hahahha'}
              });
          }
        })

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions