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:
@@ -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
|
||||
Reference in New Issue
Block a user