fix onedrive upload issue!

This commit is contained in:
fyears
2022-04-01 23:39:41 +08:00
parent 714ea43613
commit 953507ec43
3 changed files with 24 additions and 8 deletions
+6 -3
View File
@@ -30,7 +30,12 @@ import {
requireApiVersion,
} from "obsidian";
import { Readable } from "stream";
import { API_VER_REQURL, RemoteItem, S3Config } from "./baseTypes";
import {
API_VER_REQURL,
DEFAULT_CONTENT_TYPE,
RemoteItem,
S3Config,
} from "./baseTypes";
import { decryptArrayBuffer, encryptArrayBuffer } from "./encrypt";
import {
arrayBufferToBuffer,
@@ -247,8 +252,6 @@ export const uploadToRemote = async (
}
const isFolder = fileOrFolderPath.endsWith("/");
const DEFAULT_CONTENT_TYPE = "application/octet-stream";
if (isFolder && isRecursively) {
throw Error("upload function doesn't implement recursive function yet!");
} else if (isFolder && !isRecursively) {