private void ConnectCloudBlobClient(CloudStorageAccount account) { try { this.Cursor = Cursors.Wait; client = CloudStorageAccountStorageClientExtensions.CreateCloudBlobClient(account); BlobContainerTextBox.IsEnabled = true; DownloadButton.IsEnabled = true; } catch (Exception ex) { MessageBox.Show("Error: " + ex.Message); } finally { this.Cursor = Cursors.Arrow; } }
public void Save(string filename, Stream filestream, string contentType) { var client = CloudStorageAccountStorageClientExtensions.CreateCloudBlobClient(new CloudStorageAccount(new StorageCredentialsAccountAndKey("two10ra", "dmIMUY1mg/qPeOgGmCkO333L26cNcnUA1uMcSSOFMB3cB8LkdDkh02RaYTPLBL8qMqnqazqd6uMxI2bJJEnj0g=="), false)); client.GetContainerReference("imageuploads").GetBlobReference(filename).UploadFromStream(filestream); }