Skip to content

[Android] convertFileSrc does not correctly convert sdcard paths. #598

Open
@distante

Description

@distante

After choose a file this nativePath is returned:

file:///sdcard/Music/Sinéad O'Connor/Sean Nos Jua (2002)/05 - Óró Sé Do Bheatha 'Bhaile.flac

parsing it with convertFileSrc returns:
https://localhost/_app_file_/sdcard/Music/Sinéad O'Connor/Sean Nos Jua (2002)/05 - Óró Sé Do Bheatha 'Bhaile.flac""

which can not be loaded by the webview.
Complete file info:

{
"extension":".flac","name":"05 - Óró Sé Do Bheatha 'Bhaile",
"nativePath":"file:///sdcard/Music/Sinéad O'Connor/Sean Nos Jua (2002)/05 - Óró Sé Do Bheatha 'Bhaile.flac",
"uri":"content://com.android.externalstorage.documents/document/326E-6BB3%3AMusic%2FSin%C3%A9ad%20O'Connor%2FSean%20Nos%20Jua%20(2002)%2F05%20-%20%C3%93r%C3%B3%20S%C3%A9%20Do%20Bheatha%20'Bhaile.flac",
"ionicPath":"https://localhost/_app_file_/sdcard/Music/Sinéad O'Connor/Sean Nos Jua (2002)/05 - Óró Sé Do Bheatha 'Bhaile.flac"
}

Selecting the same file but from the "Music" quick access works as expected.

Also converting the uri instead of the nativePath works as expected but it fails after the app restarts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions