PutBlob() public method

public PutBlob ( string containername, string blobname, Hashtable headers, byte data, string content_type ) : BlobStorageResponse
containername string
blobname string
headers System.Collections.Hashtable
data byte
content_type string
return BlobStorageResponse
Beispiel #1
0
        public CacheUtilsTest()
        {
            this.blob_uri = BlobStorage.MakeAzureBlobUri(this.containername, this.blobname, false);
            this.view_uri = new Uri(this.blob_uri.ToString() + "?view=government&count=10");
            var bs_response = bs.PutBlob(containername, blobname, new Hashtable(), view_contents, null);

            Assert.That(bs_response.HttpResponse.status == System.Net.HttpStatusCode.Created);
            this.blob_etag = HttpUtils.MaybeGetHeaderFromUriHead("ETag", blob_uri);
            this.view_etag = HttpUtils.GetMd5Hash(cached_blob_contents);
        }
Beispiel #2
0
        public static BlobStorageResponse WriteToAzureBlob(BlobStorage bs, string containername, string blobname, string content_type, byte[] bytes)
        {
            if (BlobStorage.ExistsContainer(containername) == false)
            {
                bs.CreateContainer(containername, true, new Hashtable());
            }
            var headers = new Hashtable();
            BlobStorageResponse bs_response;

            bs_response = bs.PutBlob(containername, blobname, headers, bytes, content_type);
            return(bs_response);
        }
Beispiel #3
0
 public static BlobStorageResponse WriteToAzureBlob(BlobStorage bs, string containername, string blobname, string content_type, byte[] bytes)
 {
     if (BlobStorage.ExistsContainer(containername) == false)
         bs.CreateContainer(containername, true, new Hashtable());
     var headers = new Hashtable();
     BlobStorageResponse bs_response;
     bs_response = bs.PutBlob(containername, blobname, headers, bytes, content_type);
     return bs_response;
 }