mirror of
https://github.com/trympet/nextcloud-artifacts-action.git
synced 2025-04-24 20:16:08 +02:00
tesst
This commit is contained in:
parent
b7837011bd
commit
f7ad337105
4
dist/index.js
vendored
4
dist/index.js
vendored
@ -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;
|
||||
}
|
||||
|
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
@ -168,16 +168,12 @@ export class NextcloudClient {
|
||||
const remoteStream = this.davClient.createWriteStream(remoteFilePath, {
|
||||
headers: { 'Content-Length': fileStat.size.toString() }
|
||||
})
|
||||
const reamteStreamPromise = new Promise<void>((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(() => {}, 20_000);
|
||||
await fileStreamPromise
|
||||
await reamteStreamPromise
|
||||
|
||||
clearTimeout(timer);
|
||||
return remoteFilePath
|
||||
|
Loading…
x
Reference in New Issue
Block a user