Skip to content

Commit

Permalink
Fixed getting result of uploading to S3. Bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
emcifuntik committed Apr 7, 2023
1 parent 7dee85b commit d6f2930
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@altmp/upload-tool",
"version": "1.1.2",
"version": "1.1.3",
"author": "altMP Team",
"bin": {
"alt-upload": "./cli.js"
Expand Down
9 changes: 8 additions & 1 deletion s3upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,14 @@ async function _upload(data, cdnPath, contentType) {
Key: cdnPath,
ContentType: contentType,
};
return uploadS3Internal(params);
try {
await uploadS3Internal(params);
return true;
}
catch(err) {
console.error(err);
return false;
}
}

async function uploadFile(filePath, cdnPath) {
Expand Down

0 comments on commit d6f2930

Please sign in to comment.