From 33a8899d331c2abcb7eccca6d2f13e98e79c445a Mon Sep 17 00:00:00 2001 From: Joscha Date: Mon, 20 Feb 2023 11:36:55 +0100 Subject: [PATCH] revert: production debugging --- src/pages/api/image/presign.ts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/pages/api/image/presign.ts b/src/pages/api/image/presign.ts index 9196dd4..6547117 100644 --- a/src/pages/api/image/presign.ts +++ b/src/pages/api/image/presign.ts @@ -22,14 +22,6 @@ const handler = async ( const key = `${fileId}.${fileExtension}` // Create a presigned POST request to upload the file to S3 - - // debug env variables - if (!process.env.S3_REGION) throw new Error("S3_REGION is undefined") - if (!process.env.S3_ACCESS_KEY_ID) - throw new Error("S3_ACCESS_KEY_ID is undefined") - if (!process.env.S3_SECRET_ACCESS_KEY) - throw new Error("S3_SECRET_ACCESS_KEY is undefined") - const { url: postUrl, fields } = (await new Promise((resolve, reject) => { s3.createPresignedPost( {