Skip to content

Commit ad5a711

Browse files
committed
🐛 修复OneDrive上传文件问题 #366
1 parent f391f3a commit ad5a711

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

pkg/filesystem/onedrive/onedrive.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,9 @@ export default class OneDriveFileSystem implements FileSystem {
8888
request(url: string, config?: RequestInit, nothen?: boolean) {
8989
config = config || {};
9090
const headers = <Headers>config.headers || new Headers();
91-
headers.append(`Authorization`, `Bearer ${this.accessToken}`);
91+
if (url.indexOf("uploadSession") === -1) {
92+
headers.append(`Authorization`, `Bearer ${this.accessToken}`);
93+
}
9294
config.headers = headers;
9395
const ret = fetch(url, config);
9496
if (nothen) {

0 commit comments

Comments
 (0)