mirror of
https://github.com/trympet/nextcloud-artifacts-action.git
synced 2025-04-24 20:16:08 +02:00
test
This commit is contained in:
parent
ae39220a7a
commit
c38757acba
1437
dist/index.js
vendored
1437
dist/index.js
vendored
File diff suppressed because it is too large
Load Diff
@ -158,12 +158,13 @@ export class NextcloudClient {
|
||||
|
||||
const remoteFilePath = path.join(remoteFileDir, `${this.artifact}.zip`);
|
||||
core.info("Transferring file...");
|
||||
fsSync.createReadStream(file)
|
||||
.pipe(this.davClient.createWriteStream(remoteFilePath))
|
||||
.on('error', () => core.setFailed("Failed to upload file"))
|
||||
.on('finish', () => core.info("File upload finished"));
|
||||
const stream = fsSync.createReadStream(file)
|
||||
.pipe(this.davClient.createWriteStream(remoteFilePath));
|
||||
|
||||
return remoteFilePath;
|
||||
return await new Promise<string>((resolve, reject) =>{
|
||||
stream.on('error', () => reject("Failed to upload file"))
|
||||
.on('finish', () => resolve(remoteFilePath));
|
||||
});
|
||||
}
|
||||
|
||||
private async shareFile(remoteFilePath: string) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user