Skip to content

fileEntry.file() not returning a file #317

Open
@eeerrrttty

Description

@eeerrrttty

here is my code:

window.resolveLocalFileSystemURL(cameraCallback, (fileEntry) => {
  this.teste1 = fileEntry
  fileEntry.file(function (file) {
    this.teste2 = file
    let reader = new FileReader()
    reader.onloadend = function (e) {
      this.teste3 = this.result
    }
    reader.readAsDataURL(file)
  })
}, (error) => {
  this.teste4 = error
})

Here is my filyEntry:

File Entry { "isFile": true, "isDirectory": false, "name": "1558418616412.jpg", "fullPath": "/Android/data/org.cordova.quasar.app/cache/1558418616412.jpg", "filesystem": "", "nativeURL": "file:///storage/emulated/0/Android/data/org.cordova.quasar.app/cache/1558418616412.jpg" }
what was i expecting?

--> this.teste2 to be a file, but it is not being returned.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions