mirror of
https://github.com/mickael-kerjean/filestash.git
synced 2025-11-02 20:23:32 +08:00
feature (minio): integrate support for minio in the S3 backend - #62
This commit is contained in:
@ -11,12 +11,18 @@ function decode(path){
|
||||
}
|
||||
|
||||
function connect(params){
|
||||
var s3 = new AWS.S3({
|
||||
let config = {
|
||||
apiVersion: '2006-03-01',
|
||||
accessKeyId: params.access_key_id,
|
||||
secretAccessKey: params.secret_access_key,
|
||||
sslEnabled: true
|
||||
});
|
||||
signatureVersion: 'v4',
|
||||
s3ForcePathStyle: true,
|
||||
//sslEnabled: true
|
||||
};
|
||||
if(params.endpoint){
|
||||
config.endpoint = new AWS.Endpoint(params.endpoint);
|
||||
}
|
||||
var s3 = new AWS.S3(config);
|
||||
return Promise.resolve(s3);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user