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 2018/09/26 14:20:38 UTC

[GitHub] sveta-wl opened a new issue #255: checkFile doesn't see files on external SD card

sveta-wl opened a new issue #255: checkFile doesn't see files on external SD card
URL: https://github.com/apache/cordova-plugin-file/issues/255
 
 
   Hi guys,
   
   I have a problem with File plugin using it in Ionic 3 project. Could you please help me?
   
   When I call `checkDir()`, `listDir()` or `checkFile()` with:
   - absolute SD card path like this one: `/storage/sd-card-id/Android/data/app-id/files` (the path I use to store files with FileTransfer plugin) I receive `ENCODING_ERR`, 
   - using a path like this one `file:///storage/sd-card-id/Android/data/app-id/files` cause no errors by checking folders, but it doesn't see any files, so I receive `NOT_FOUND_ERR` by `checkFile()`.
   
   I also added these preferences in the `config.xml`
   ```
   <preference name="AndroidPersistentFileLocation" value="Internal" />
   <preference name="AndroidPersistentFileLocation" value="Compatibility" />
   <preference name="AndroidExtraFilesystems" value="files,files-external,documents,sdcard,cache,cache-external,assets,root" />
   ```
   and provide dynamic access request for the data storage. So the fileTransfer plugin, for example, works fine in the app and stores files on the SD card. 
   
   As far as I can see the value of `cordova.file.externalApplicationStorageDirectory` (and other external path variables) is `/storage/emulated/0/path/to/file` but not the real path. 
   
   How can I access the files on a SD card using this plugin?
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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