From e1216109bcdffb60484cb6ff640343e2ded152cb Mon Sep 17 00:00:00 2001 From: Book Pauk Date: Mon, 22 Nov 2021 21:12:02 +0700 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=20=D0=B1=D0=B0=D0=B3=20=D1=81=20maxBodyLength=20?= =?UTF-8?q?=D0=BA=D0=BB=D0=B8=D0=B5=D0=BD=D1=82=D0=B0=20WebDav?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/core/RemoteWebDavStorage.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/core/RemoteWebDavStorage.js b/server/core/RemoteWebDavStorage.js index 21d0c107..e4f0f937 100644 --- a/server/core/RemoteWebDavStorage.js +++ b/server/core/RemoteWebDavStorage.js @@ -7,6 +7,7 @@ class RemoteWebDavStorage { constructor(config) { this.config = Object.assign({}, config); this.config.maxContentLength = this.config.maxContentLength || 10*1024*1024; + this.config.maxBodyLength = this.config.maxContentLength; this.wdc = createClient(config.url, this.config); } @@ -30,7 +31,7 @@ class RemoteWebDavStorage { } async writeFile(filename, data) { - return await this.wdc.putFileContents(filename, data, { maxContentLength: this.config.maxContentLength }) + return await this.wdc.putFileContents(filename, data) } async unlink(filename) { @@ -38,7 +39,7 @@ class RemoteWebDavStorage { } async readFile(filename) { - return await this.wdc.getFileContents(filename, { maxContentLength: this.config.maxContentLength }) + return await this.wdc.getFileContents(filename) } async mkdir(dirname) {