diff options
| author | Mert Demir <mertd@users.noreply.github.com> | 2024-02-01 07:00:19 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-31 17:00:19 -0500 |
| commit | 08d75fd75c063bd17d2471b263452b490910338b (patch) | |
| tree | 8374575ab7ad02327fa3a4fbfa5d04415d3944d6 /src/app/api/s3-upload/route.ts | |
| parent | e6467b41fccefe1ceb39dd1ed6343290e152be85 (diff) | |
Support for additional S3 providers (#71)
* support for other s3 providers
* remove redundant route options
* use type safe env
* prettier
Diffstat (limited to 'src/app/api/s3-upload/route.ts')
| -rw-r--r-- | src/app/api/s3-upload/route.ts | 4 |
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, }) |
