2
0

docs: 📝 Update env var and write Configuration doc

This commit is contained in:
Baptiste Arnaud
2022-03-13 08:56:10 +01:00
parent b37db3cee3
commit 69248f94d4
35 changed files with 455 additions and 260 deletions

View File

@ -19,12 +19,11 @@ const handler = async (
if (
!process.env.S3_ENDPOINT ||
!process.env.S3_ACCESS_KEY ||
!process.env.S3_SECRET_KEY ||
!process.env.S3_BUCKET
!process.env.S3_SECRET_KEY
)
return res.send({
message:
'S3 not properly configured. Missing one of those variables: S3_ENDPOINT, S3_ACCESS_KEY, S3_ACCESS_KEY, S3_BUCKET',
'S3 not properly configured. Missing one of those variables: S3_ENDPOINT, S3_ACCESS_KEY, S3_SECRET_KEY',
})
const s3 = new Client({
@ -40,7 +39,7 @@ const handler = async (
const filePath = req.query.filePath as string | undefined
if (!filePath) return badRequest(res)
const presignedUrl = await s3.presignedPutObject(
process.env.S3_BUCKET as string,
process.env.S3_BUCKET ?? 'typebot',
filePath
)