SetProperties() public method

Updates the blob's properties.
public SetProperties ( ) : void
return void
Example #1
0
        private static void SetMeta(CloudBlob blob, string fileName, string contentType, long maxAge)
        {
            if (null == blob) {
                throw new ArgumentNullException("blob");
            }

            // Age forever
            if (maxAge == -1) maxAge = 31536000;

            // Set properties
            blob.SetFileName(fileName);

            blob.Properties.ContentType = contentType;
            blob.Properties.CacheControl = "public, max-age=" + maxAge;
            blob.SetProperties();
        }