This commit is contained in:
Trym Lund Flogard
2021-06-05 13:54:25 +02:00
parent b7837011bd
commit f7ad337105
3 changed files with 1 additions and 9 deletions
-4
View File
@@ -612,14 +612,10 @@ class NextcloudClient {
const remoteStream = this.davClient.createWriteStream(remoteFilePath, {
headers: { 'Content-Length': fileStat.size.toString() }
});
const reamteStreamPromise = new Promise((resolve, reject) => {
remoteStream.on('error', e => reject(e)).on('finish', () => resolve());
});
fileStream.pipe(remoteStream);
// see: https://github.com/nodejs/node/issues/22088
const timer = setTimeout(() => { }, 20000);
await fileStreamPromise;
await reamteStreamPromise;
clearTimeout(timer);
return remoteFilePath;
}
+1 -1
View File
File diff suppressed because one or more lines are too long