Skip to content

Commit 4fc3c0a

Browse files
return S3 url after upload
1 parent f24c318 commit 4fc3c0a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

function/libs/s3.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@ exports.download = function download(Bucket, Key) {
1717
* @param { Buffer } Body
1818
*/
1919
exports.upload = function upload(Bucket, Key, Body) {
20-
return s3.putObject({ Bucket: Bucket, Key: Key, Body: Body }).promise();
20+
return s3.putObject({ Bucket: Bucket, Key: Key, Body: Body })
21+
.promise().then(_ => `s3://${Bucket}/${Key}`);
2122
}

0 commit comments

Comments
 (0)