react-native-fs: How to read local images (Get base64 of local file)

前端 未结 2 1942
慢半拍i
慢半拍i 2021-01-03 15:38

I have local files in my app which I read like this:

How to read this file using R

2条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-03 16:15

    Just using filename = response.uri.replace('file:', '')

    The final code:

    if (Platform.OS === 'ios') {
          filename = response.uri.replace('file:', '')
    } else {
          filename = response.uri
    }
    

    Working now ...

提交回复
热议问题