Example #1
0
        void UploadContent(string key, Stream content)
        {
            var request = new PutObjectRequest()
                          .WithBucketName(bucket)
                          .WithKey(key)
                          .WithCannedACL(cannedACL)
                          .WithInputStream(content) as PutObjectRequest;

            if (headers != null)
            {
                request.AddHeaders(headers);
            }

            //TODO: handle exceptions properly
            s3client.PutObject(request);

            if (invalidator != null)
            {
                invalidator.InvalidateObject(bucket, key);
            }
        }