use arraybuffer instead of uint8array

This commit is contained in:
fyears
2022-02-27 21:45:00 +08:00
parent ddb86745dd
commit c1771bb117
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -456,7 +456,7 @@ export const uploadToRemote = async (
let localContent = undefined;
if (uploadRaw) {
if (typeof rawContent === "string") {
localContent = new TextEncoder().encode(rawContent);
localContent = new TextEncoder().encode(rawContent).buffer;
} else {
localContent = rawContent;
}
+1 -1
View File
@@ -690,7 +690,7 @@ export const uploadToRemote = async (
let localContent = undefined;
if (uploadRaw) {
if (typeof rawContent === "string") {
localContent = new TextEncoder().encode(rawContent);
localContent = new TextEncoder().encode(rawContent).buffer;
} else {
localContent = rawContent;
}
+1 -1
View File
@@ -141,7 +141,7 @@ export const uploadToRemote = async (
let localContent = undefined;
if (uploadRaw) {
if (typeof rawContent === "string") {
localContent = new TextEncoder().encode(rawContent);
localContent = new TextEncoder().encode(rawContent).buffer;
} else {
localContent = rawContent;
}
+1 -1
View File
@@ -182,7 +182,7 @@ export const uploadToRemote = async (
let localContent = undefined;
if (uploadRaw) {
if (typeof rawContent === "string") {
localContent = new TextEncoder().encode(rawContent);
localContent = new TextEncoder().encode(rawContent).buffer;
} else {
localContent = rawContent;
}