Esempio n. 1
0
        public static void DownloadStream(string absoluteUri, Stream destination, out AjaxFileUploadBlobInfo blobInfo, bool deleteOnDownloaded)
        {
            var blobClient = GetCloudBlobClient();
            var blob       = blobClient.GetBlobReferenceFromServer(new Uri(absoluteUri));
            var name       = blob.Name;

            blobInfo = new AjaxFileUploadBlobInfo
            {
                Name        = name,
                Extension   = name.Substring(name.LastIndexOf(".") + 1),
                Length      = blob.Properties.Length,
                ContentType = blob.Properties.ContentType
            };

            blob.DownloadToStream(destination);

            if (deleteOnDownloaded)
            {
                blob.Delete();
            }
        }
Esempio n. 2
0
 public static void DownloadStream(string absoluteUri, Stream destination, out AjaxFileUploadBlobInfo blobInfo)
 {
     DownloadStream(absoluteUri, destination, out blobInfo, false);
 }