Snowcode.S3BuildPublisher.S3.S3Helper.StoreFile C# (CSharp) Method

StoreFile() private method

private StoreFile ( string file, string key, string bucketName, bool publicRead ) : void
file string
key string
bucketName string
publicRead bool
return void
        private void StoreFile(string file, string key, string bucketName, bool publicRead)
        {
            S3CannedACL acl = publicRead ? S3CannedACL.PublicRead : S3CannedACL.Private;

            var request = new PutObjectRequest();
            request
                .WithCannedACL(acl)
                .WithFilePath(file)
                .WithBucketName(bucketName)
                .WithKey(key);

            Client.PutObject(request);
        }