(uri: string)
| 181 | }; |
| 182 | |
| 183 | const readFileAsBase64 = async (uri: string): Promise<string> => { |
| 184 | try { |
| 185 | return await RNFS.readFile(uri, 'base64'); |
| 186 | } catch { |
| 187 | return await RNFS.readFile(uri.replace(/^file:\/\//, ''), 'base64'); |
| 188 | } |
| 189 | }; |
| 190 | |
| 191 | const handleImageFile = async (fileCopyUri: string): Promise<{ data: string | false; uri: string | false }> => { |
| 192 | const base64 = await readFileAsBase64(fileCopyUri); |