mirror of
https://github.com/spliit-app/spliit.git
synced 2026-02-22 07:26:13 +01:00
Support for additional S3 providers (#71)
* support for other s3 providers * remove redundant route options * use type safe env * prettier
This commit is contained in:
@@ -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,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user