Skip to content

Commit 74a2cf0

Browse files
authored
fix:修复readFile读取文件以base64的编码格式返回应用闪退 (#19)
1 parent e099dc7 commit 74a2cf0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

harmony/blobUtil/src/main/ets/ReactNativeBlobUtil/ReactNativeBlobUtilFS.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ export default class ReactNativeBlobUtilFS {
350350
let bytes = buffer.from(buf, 0, readLen);
351351
switch (encoding.toLowerCase()) {
352352
case "base64":
353-
resolve(buffer.transcode(bytes, 'utf-8', 'base64'));
353+
resolve(bytes.toString("base64"));
354354
break;
355355
case "ascii":
356356
resolve(buffer.transcode(bytes, 'utf-8', 'ascii'));

0 commit comments

Comments
 (0)