This commit is contained in:
Trym Lund Flogard 2021-06-02 19:17:08 +02:00
parent c38757acba
commit 2431c40b14
2 changed files with 716 additions and 714 deletions

1427
dist/index.js vendored

File diff suppressed because it is too large Load Diff

View File

@ -43,6 +43,7 @@ export class NextcloudClient {
core.info("Uploading to Nextcloud...");
const path = await this.upload(zip);
core.info(`File path: ${path}`);
core.info("Sharing file...");
await this.shareFile(path);
}
@ -161,7 +162,7 @@ export class NextcloudClient {
const stream = fsSync.createReadStream(file)
.pipe(this.davClient.createWriteStream(remoteFilePath));
return await new Promise<string>((resolve, reject) =>{
return await new Promise<string>((resolve, reject) => {
stream.on('error', () => reject("Failed to upload file"))
.on('finish', () => resolve(remoteFilePath));
});