drive-s3
drive-s3 copied to clipboard
Path style don't work on getUrl
Package version
v1.3.3
Node.js and npm version
- Node:
v21.5.0 - NPM :
v10.2.4
Sample Code
Code is fairly simple:
public async download(ctx: HttpContextContract) {
return Drive.getUrl("hello.txt")
}
Env file:
DRIVE_DISK=s3
S3_KEY=mykey
S3_SECRET=mysecret
S3_BUCKET=thegreatbucket
S3_REGION=us-east-1
S3_ENDPOINT=https://myminioinstance.ch
Driver config:
s3: {
driver: 's3',
visibility: 'private',
key: Env.get('S3_KEY'),
secret: Env.get('S3_SECRET'),
region: Env.get('S3_REGION'),
bucket: Env.get('S3_BUCKET'),
endpoint: Env.get('S3_ENDPOINT'),
forcePathStyle: true,
},
forcePathStyle is here to ensure getUrl in controller returns https://myminioinstance.ch/thegreatbucket/hello.tx but it won't work and still returns https://thegreatbucket.myminioinstance.ch/hello.txt whatever I try.