Skip to content

Commit

Permalink
console logging both sucessful upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Panduss committed Feb 9, 2023
1 parent 08b3001 commit 786390f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ async function checkIfFileExist(fileName) {
}

async function uploadFile(file, Key) {
const response = await s3
return await s3
.upload({
Bucket,
Body: Buffer.from(file),
Expand All @@ -122,11 +122,11 @@ async function uploadFile(file, Key) {
ACL: 'public-read',
})
.promise()
.then((res) => Key !== 'latest/latest.pdf' && core.setOutput('url', res.Location))
.then((res) => {
console.log(`Uploaded ${Key}`);
Key !== 'latest/latest.pdf' && core.setOutput('url', res.Location);
})
.catch((err) => core.setFailed(err.message));

console.log({yooo: response});
return response;
}

async function mapAllFiles(currentPdfName) {
Expand Down

0 comments on commit 786390f

Please sign in to comment.