This commit is contained in:
Trym Lund Flogard 2021-06-02 20:00:10 +02:00
parent a96cb53d3a
commit 1f2878a134
2 changed files with 721 additions and 719 deletions

1433
dist/index.js vendored

File diff suppressed because it is too large Load Diff

View File

@ -163,10 +163,11 @@ export class NextcloudClient {
const remoteFilePath = `${remoteFileDir}/${this.artifact}.zip`;
core.info(`Transferring file... (${file})`);
const stream = fsSync.createReadStream(file)
.pipe(this.davClient.createWriteStream(remoteFilePath));
const stream = this.davClient.createWriteStream(remoteFilePath)
fsSync.createReadStream(file)
.pipe(stream);
return new Promise<string>((resolve, reject) => {
return await new Promise<string>((resolve, reject) => {
stream.on('error', () => reject("Failed to upload file"))
.on('pipe', () => core.info("pipe"))
.on('finish', () => resolve(remoteFilePath));