Switch to minio v7 API

The secure parameter is now called useSSL
https://github.com/minio/minio-js/releases/tag/7.0.0

Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
David Mehren 2021-02-12 23:09:38 +01:00
parent 1153b9a1bb
commit 252141560f
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3
2 changed files with 3 additions and 3 deletions

View file

@ -18,7 +18,7 @@ if (config.dbURL) {
const minioClient = new Minio.Client({
endPoint: config.minio.endPoint,
port: config.minio.port,
secure: config.minio.secure,
useSSL: config.minio.secure,
accessKey: config.minio.accessKey,
secretKey: config.minio.secretKey
});
@ -49,7 +49,7 @@ fs.readdir(config.uploadsPath, function (err, files) {
if (err) {
console.log('Unable to scan directory: ' + err);
process.exit();
}
}
files.forEach(function (file) {
key = path.join('uploads', file)
filePath = path.join(config.uploadsPath, file)

View file

@ -10,7 +10,7 @@ const Minio = require('minio')
const minioClient = new Minio.Client({
endPoint: config.minio.endPoint,
port: config.minio.port,
secure: config.minio.secure,
useSSL: config.minio.secure,
accessKey: config.minio.accessKey,
secretKey: config.minio.secretKey
})