This commit is contained in:
Trym Lund Flogard 2021-06-05 14:11:48 +02:00
parent 565777588d
commit bcd3d376b1
2 changed files with 4 additions and 4 deletions

View File

@ -16,7 +16,7 @@ export class NextcloudArtifact {
readonly errorBehavior: NoFileOption
constructor(private inputs: Inputs) {
this.token = inputs.Token;
this.token = inputs.Token
this.name = inputs.ArtifactName
this.path = inputs.ArtifactPath
this.errorBehavior = inputs.NoFileBehvaior

View File

@ -138,14 +138,14 @@ export class NextcloudClient {
fileStream.pipe(remoteStream)
const timer = setTimeout(() => {}, 20_000);
const timer = setTimeout(() => {}, 20_000)
await Promise.all([fileStreamPromise, remoteStreamPromise])
// HACK: Nextcloud has not fully processed the file, despite returning 200.
// Waiting for 1s seems to do the trick.
await new Promise(resolve => setTimeout(resolve, 1_000));
await new Promise(resolve => setTimeout(resolve, 1_000))
clearTimeout(timer);
clearTimeout(timer)
return remoteFilePath
}