Fix us-east-1 case when generating bucket URL
This commit is contained in:
Родитель
c191e1f9cc
Коммит
e73f49ec79
7
index.js
7
index.js
|
@ -155,7 +155,12 @@ module.exports.convert = async function convert(event, context, callback) {
|
|||
|
||||
return callback(null, {
|
||||
statusCode: 200,
|
||||
body: JSON.stringify({ url: `https://${scratchBucketId}.s3-${scratchBucketRegion}.amazonaws.com/${destKey}` }),
|
||||
body: JSON.stringify({
|
||||
url:
|
||||
scratchBucketRegion === "us-east-1"
|
||||
? `https://${scratchBucketId}.s3.amazonaws.com/${destKey}`
|
||||
: `https://${scratchBucketId}.s3-${scratchBucketRegion}.amazonaws.com/${destKey}`
|
||||
}),
|
||||
isBase64Encoded: false
|
||||
});
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче