Nugine / s3s

S3 Service Adapter
Apache License 2.0
132 stars 33 forks source link

Fix signature v2 #137

Closed Nugine closed 6 months ago

Nugine commented 6 months ago

resolves #135


Test (todo in #68)

npm i aws-sdk
import AWS from 'aws-sdk';

var s3 = new AWS.S3({
    endpoint: "http://localhost:8014",
    region: "us-east-1",
    credentials: {
        accessKeyId: "minioadmin",
        secretAccessKey: "minioadmin"
    },
    signatureVersion: "v2",
    s3ForcePathStyle: true
});

s3.listBuckets((err, data) => {
    if (err) console.log(err, err.stack);
    else console.log(data);
})

s3.listObjects({ Bucket: "tmp1", Delimiter: "/", Prefix: "" }, (err, data) => {
    if (err) console.log(err, err.stack);
    else console.log(data);
})