@@ -276,10 +276,9 @@ async function getS3CompatibleStorage(project) {
276276 if ( ! project . resources ?. storage ?. isExternal ) {
277277
278278 if (
279- ! process . env . SUPABASE_S3_ENDPOINT ||
280- ! process . env . SUPABASE_S3_ACCESS_KEY_ID ||
281- ! process . env . SUPABASE_S3_SECRET_ACCESS_KEY ||
282- ! process . env . SUPABASE_BUCKET
279+ ! process . env . SUPABASE_URL ||
280+ ! process . env . SUPABASE_PUBLIC_KEY ||
281+ ! process . env . SUPABASE_SECRET_KEY
283282 ) {
284283 throw new Error (
285284 "Internal Supabase S3 configuration is incomplete"
@@ -288,18 +287,17 @@ async function getS3CompatibleStorage(project) {
288287
289288 const s3Client = new S3Client ( {
290289 region : "auto" ,
291- endpoint : process . env . SUPABASE_S3_ENDPOINT ,
290+ endpoint : process . env . SUPABASE_URL ,
292291 forcePathStyle : true ,
293292 credentials : {
294- accessKeyId : process . env . SUPABASE_S3_ACCESS_KEY_ID ,
295- secretAccessKey : process . env . SUPABASE_S3_SECRET_ACCESS_KEY
293+ accessKeyId : process . env . SUPABASE_PUBLIC_KEY ,
294+ secretAccessKey : process . env . SUPABASE_SECRET_KEY
296295 }
297296 } ) ;
298297
299298 return {
300299 provider : "supabase_internal" ,
301- s3Client,
302- bucket : process . env . SUPABASE_BUCKET
300+ s3Client
303301 } ;
304302 }
305303
@@ -322,8 +320,7 @@ async function getS3CompatibleStorage(project) {
322320 if (
323321 ! config . s3Endpoint ||
324322 ! config . s3AccessKeyId ||
325- ! config . s3SecretAccessKey ||
326- ! config . bucket
323+ ! config . s3SecretAccessKey
327324 ) {
328325 throw new Error (
329326 "Supabase S3-compatible configuration is incomplete"
@@ -342,8 +339,7 @@ async function getS3CompatibleStorage(project) {
342339
343340 return {
344341 provider,
345- s3Client,
346- bucket : config . bucket
342+ s3Client
347343 } ;
348344 }
349345
@@ -353,8 +349,7 @@ async function getS3CompatibleStorage(project) {
353349 if (
354350 ! config . endpoint ||
355351 ! config . accessKeyId ||
356- ! config . secretAccessKey ||
357- ! config . bucket
352+ ! config . secretAccessKey
358353 ) {
359354 throw new Error (
360355 "S3-compatible storage configuration is incomplete"
@@ -373,8 +368,7 @@ async function getS3CompatibleStorage(project) {
373368
374369 return {
375370 provider,
376- s3Client,
377- bucket : config . bucket
371+ s3Client
378372 } ;
379373 }
380374
0 commit comments