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/25 12:36:25 UTC
[GitHub] [cordova-plugin-file] yoprogramo opened a new issue #303: FILE NOT
FOUND When external file requested
yoprogramo opened a new issue #303: FILE NOT FOUND When external file requested
URL: https://github.com/apache/cordova-plugin-file/issues/303
I try to open a file on Downloads folder using cordova-plugin-file.
This is the file:
file:///storage/emulated/0/Download/backup_2.nmp
When I call resolveLocalFileSystemURL with this path I receive this object:
```
{File {name: "backup_2.nmp", localURL: "cdvfile://localhost/sdcard/Download/backup_2.nmp", type: null, lastModified: 1553501140000, lastModifiedDate: 1553501140000, …}
end: 336
lastModified: 1553501140000
lastModifiedDate: 1553501140000
localURL: "cdvfile://localhost/sdcard/Download/backup_2.nmp"
name: "backup_2.nmp"
size: 336
start: 0
type: null
...
}
```
That means that the app has access to this file (size and dates are ok), but onloadend the result is null
```
_error: FileError {code: 1}
_localURL: "cdvfile://localhost/sdcard/Download/backup_2.nmp"
_progress: 0
_readyState: 2
_realReader: FileReader {readyState: 0, result: null, error: null, onloadstart: null, onprogress: null, …}
```
Meanwhile if I select a file inside the app root everythig goes well:
file:///storage/emulated/0/Android/data/com.biblioeteca.apps.myapp/files/export.nmp
```
_error: null
_localURL: "cdvfile://localhost/files-external/export.nmp"
_progress: 336
_readyState: 2
_realReader: FileReader {readyState: 0, result: null, error: null, onloadstart: null, onprogress: null, …}
_result: "..."
```
What I am doing wrong?
----------------------------------------------------------------
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