MCPcopy
hub / github.com/BlueWallet/BlueWallet / readFileAsBase64

Function readFileAsBase64

blue_modules/fs.ts:183–189  ·  view source on GitHub ↗
(uri: string)

Source from the content-addressed store, hash-verified

181};
182
183const 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
191const handleImageFile = async (fileCopyUri: string): Promise<{ data: string | false; uri: string | false }> => {
192 const base64 = await readFileAsBase64(fileCopyUri);

Callers 1

handleImageFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected