diff --git a/my-app/src/components/form/file_form.tsx b/my-app/src/components/form/file_form.tsx index c77f879..64e0689 100644 --- a/my-app/src/components/form/file_form.tsx +++ b/my-app/src/components/form/file_form.tsx @@ -11,10 +11,10 @@ type FileData = { }; const s3Client = new S3Client({ - region: process.env.AWS_REGION, + region: process.env.NEXT_PUBLIC_AWS_REGION, credentials: { - accessKeyId: process.env.AWS_ACCESS_KEY_ID || '', - secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY || '', + accessKeyId: process.env.NEXT_PUBLIC_AWS_ACCESS_KEY_ID || '', + secretAccessKey: process.env.NEXT_PUBLIC_AWS_SECRET_ACCESS_KEY || '', }, }); @@ -104,7 +104,7 @@ const FileForm = forwardRef(({ onNext, onBack }: { onNext: () => void, onBack: ( const name = `image_${Date.now()}_${uniqueId}.jpg`; const contentType = 'image/jpeg'; - const bucketName = process.env.AWS_S3_BUCKET_NAME; + const bucketName = process.env.NEXT_PUBLIC_AWS_S3_BUCKET_NAME; const base64Data = Buffer.from(imageData.replace(/^data:image\/\w+;base64,/, ""), 'base64');