ADD: SignedUrls for documents, mainImage and images

ADD: Bucket and Upload System
ADD: New errors
ADD: Virtuals for categories
ADD: Features system
ADD: File management system
This commit is contained in:
2025-01-04 22:06:43 +03:30
parent 9e342cbc57
commit 2d87cc4834
21 changed files with 2100 additions and 77 deletions
+30
View File
@@ -0,0 +1,30 @@
const Minio = require('minio')
const endPoint = process.env.AWS_ENDPOINT
const accessKey = process.env.AWS_ACCESS_KEY
const secretKey = process.env.AWS_SECRET_KEY
const region = process.env.AWS_REGION
const port = parseInt(process.env.AWS_PORT)
let client
if (process.env.NODE_ENV === 'test') {
client = new Minio.Client({
endPoint,
useSSL: true,
accessKey,
port,
secretKey,
region,
})
} else {
client = new Minio.Client({
endPoint,
useSSL: true,
accessKey,
secretKey,
region,
})
}
module.exports = client