🎥 Make videos programmatically with React
return correct address
Jonny Burger3d11f4f40ff9
diff --git a/packages/lambda/src/functions/helpers/find-output-file-in-bucket.ts b/packages/lambda/src/functions/helpers/find-output-file-in-bucket.tsindex 7a73966dc3..4f52ac121c 100644--- a/packages/lambda/src/functions/helpers/find-output-file-in-bucket.ts+++ b/packages/lambda/src/functions/helpers/find-output-file-in-bucket.ts@@ -1,7 +1,7 @@import {_Object} from '@aws-sdk/client-s3';import {RenderMetadata} from '../../shared/constants';import {getExpectedOutName} from './expected-out-name';-import {getCurrentRegionInFunction} from './get-current-region';+import {getOutputUrlFromMetadata} from './get-output-url-from-metadata';export const findOutputFileInBucket = ({contents,@@ -39,6 +39,6 @@ export const findOutputFileInBucket = ({return {lastModified: output.LastModified?.getTime() as number,size: output.Size as number,- url: `https://s3.${getCurrentRegionInFunction()}.amazonaws.com/${bucketName}/${expectedOutName}`,+ url: getOutputUrlFromMetadata(renderMetadata, bucketName),};};diff --git a/packages/lambda/src/functions/still.ts b/packages/lambda/src/functions/still.tsindex db2e07e764..b4aa087415 100644--- a/packages/lambda/src/functions/still.ts+++ b/packages/lambda/src/functions/still.ts@@ -22,6 +22,7 @@ import {getExpectedOutName} from './helpers/expected-out-name';import {formatCostsInfo} from './helpers/format-costs-info';import {getBrowserInstance} from './helpers/get-browser-instance';import {getCurrentRegionInFunction} from './helpers/get-current-region';+import {getOutputUrlFromMetadata} from './helpers/get-output-url-from-metadata';import {lambdaWriteFile} from './helpers/io';import {validateComposition} from './helpers/validate-composition';import {@@ -140,7 +141,7 @@ const innerStillHandler = async (});return {- output: `https://s3.${getCurrentRegionInFunction()}.amazonaws.com/${renderBucketName}/${outName}`,+ output: getOutputUrlFromMetadata(renderMetadata, bucketName),size,bucketName,estimatedPrice: formatCostsInfo(estimatedPrice),