public void bytes(binaryBlob blob) { byte[] bytes = Convert.FromBase64String(blob.bytesEncoded); BlobHelper bh = new BlobHelper("default"); bh.PutBlob(blob.containerName, blob.blobName, bytes); return; }
public binaryBlob bytes(string c /* container */, string b /* blob */) { binaryBlob blob = new binaryBlob(); BlobHelper bh = new BlobHelper("default"); byte[] bytes = null; bh.GetBlob(c, b, out bytes); blob.containerName = c; blob.blobName = b; if (bytes != null) { blob.bytesEncoded = Convert.ToBase64String(bytes); } else { blob.bytesEncoded = null; } return blob; }