Ejemplo n.º 1
0
        /// <inheritdoc />
        public override void SetProperties(IBlobContentLocation content, IBlobProperties properties)
        {
            var blob = this.GetBlob(content);

            blob.Properties.ContentType  = properties.ContentType;
            blob.Properties.CacheControl = properties.CacheControl;

            blob.BeginSetProperties(null, null);
        }
        /// <summary>
        /// Sets the properties, like cacheControl, content type, etc.
        /// </summary>
        /// <param name="location">Descriptor of the item on the remote blob storage.</param>
        /// <param name="properties">The properties to set.</param>
        public override void SetProperties(IBlobContentLocation location, IBlobProperties properties)
        {
            //No properties to set by default
            var req = new CopyObjectRequest()
                      .WithDirective(S3MetadataDirective.REPLACE)
                      .WithSourceBucket(this.bucketName)
                      .WithSourceKey(location.FilePath)
                      .WithDestinationBucket(this.bucketName)
                      .WithDestinationKey(location.FilePath);

            req.AddHeader("x-amz-acl", "public-read");
            req.AddHeader("Cache-Control", properties.CacheControl);
            req.AddHeader("Content-Type", properties.ContentType);

            transferUtility.S3Client.CopyObject(req);
        }
        /// <summary>
        /// Sets the properties, like cacheControl, content type, etc.
        /// </summary>
        /// <param name="location">Descriptor of the item on the remote blob storage.</param>
        /// <param name="properties">The properties to set.</param>
        public override void SetProperties(IBlobContentLocation location, IBlobProperties properties)
        {
            //No properties to set by default
            var req = new CopyObjectRequest()
            {
                MetadataDirective = S3MetadataDirective.REPLACE,
                SourceBucket      = this.bucketName,
                SourceKey         = location.FilePath,
                DestinationBucket = this.bucketName,
                DestinationKey    = location.FilePath,
                CannedACL         = S3CannedACL.PublicRead
            };

            req.Headers.CacheControl = properties.CacheControl;
            req.Headers.ContentType  = properties.ContentType;

            transferUtility.S3Client.CopyObject(req);
        }
        /// <summary>
        /// Sets the properties, like cacheControl, content type, etc.
        /// </summary>
        /// <param name="location">Descriptor of the item on the remote blob storage.</param>
        /// <param name="properties">The properties to set.</param>
        public override void SetProperties(IBlobContentLocation location, IBlobProperties properties)
        {
            //No properties to set by default
            var req = new CopyObjectRequest()
            {
                MetadataDirective = S3MetadataDirective.REPLACE,
                SourceBucket = this.bucketName,
                SourceKey = location.FilePath,
                DestinationBucket = this.bucketName,
                DestinationKey = location.FilePath,
                CannedACL = S3CannedACL.PublicRead
            };

            req.Headers.CacheControl = properties.CacheControl;
            req.Headers.ContentType = properties.ContentType;

            transferUtility.S3Client.CopyObject(req);
        }
        /// <summary>
        /// Sets the properties, like cacheControl, content type, etc.
        /// </summary>
        /// <param name="location">Descriptor of the item on the remote blob storage.</param>
        /// <param name="properties">The properties to set.</param>
        public override void SetProperties(IBlobContentLocation location, IBlobProperties properties)
        {
            //No properties to set by default
            var req = new CopyObjectRequest()
                             .WithDirective(S3MetadataDirective.REPLACE)
                             .WithSourceBucket(this.bucketName)
                             .WithSourceKey(location.FilePath)
                             .WithDestinationBucket(this.bucketName)
                             .WithDestinationKey(location.FilePath);

            req.AddHeader("x-amz-acl", "public-read");
            req.AddHeader("Cache-Control", properties.CacheControl);
            req.AddHeader("Content-Type", properties.ContentType);

            transferUtility.S3Client.CopyObject(req);
        }
 public void SetProperties(IBlobContentLocation location, IBlobProperties properties)
 {
 }
 /// <summary>
 /// Sets the properties.
 /// </summary>
 /// <param name="location">The location.</param>
 /// <param name="properties">The properties.</param>
 public override void SetProperties(IBlobContentLocation location, IBlobProperties properties)
 {
     //??
 }
        /// <inheritdoc />
        public override void SetProperties(IBlobContentLocation content, IBlobProperties properties)
        {
            var blob = this.GetBlob(content);

            blob.Properties.ContentType = properties.ContentType;
            blob.Properties.CacheControl = properties.CacheControl;

            blob.BeginSetProperties(null, null);
        }