diff --git a/packages/flydrive-s3/src/AmazonWebServicesS3Storage.ts b/packages/flydrive-s3/src/AmazonWebServicesS3Storage.ts index 0e6e0f4..b3a7175 100644 --- a/packages/flydrive-s3/src/AmazonWebServicesS3Storage.ts +++ b/packages/flydrive-s3/src/AmazonWebServicesS3Storage.ts @@ -215,8 +215,8 @@ export class AmazonWebServicesS3Storage extends Storage { * Creates a new file. * This method will create missing directories on the fly. */ - public async put(location: string, content: Buffer | NodeJS.ReadableStream | string): Promise { - const params = { Key: location, Body: content, Bucket: this.$bucket }; + public async put(location: string, content: Buffer | NodeJS.ReadableStream | string, makePublic: boolean = false): Promise { + const params = { Key: location, Body: content, Bucket: this.$bucket, ACL: makePublic ? 'public-read' : 'private' }; try { const result = await this.$driver.upload(params).promise(); return { raw: result };