Skip to content

Commit 63ad083

Browse files
WN0904LiuZi-Mang
andauthored
fix:修复readFile读取文件以base64的编码格式返回应用闪退 (#10)
Co-authored-by: 张卫杨 <zwy2961718523@163.com>
1 parent d681ae6 commit 63ad083

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)