aboutsummaryrefslogtreecommitdiffstats
path: root/src/app/api/s3-upload
diff options
context:
space:
mode:
Diffstat (limited to 'src/app/api/s3-upload')
-rw-r--r--src/app/api/s3-upload/route.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/app/api/s3-upload/route.ts b/src/app/api/s3-upload/route.ts
index 567cd40..ee3fb72 100644
--- a/src/app/api/s3-upload/route.ts
+++ b/src/app/api/s3-upload/route.ts
@@ -1,4 +1,5 @@
import { randomId } from '@/lib/api'
+import { env } from '@/lib/env'
import { POST as route } from 'next-s3-upload/route'
export const POST = route.configure({
@@ -8,4 +9,7 @@ export const POST = route.configure({
const random = randomId()
return `document-${timestamp}-${random}${extension.toLowerCase()}`
},
+ endpoint: env.S3_UPLOAD_ENDPOINT,
+ // forcing path style is only necessary for providers other than AWS
+ forcePathStyle: !!env.S3_UPLOAD_ENDPOINT,
})