Using CloudUpload / Retrieving Files for Attachments

2 posts, 0 answers
  1. Richard
    Richard avatar
    19 posts
    Member since:
    Sep 2011

    Posted 13 Nov 2014 Link to this post

    I'm writing a page that requires me to upload the file to the Azure for the purposes of keeping an archive.  So I have the upload working but I can't seem to figure out how to access the files.  So I have this to loop through after the upload and attach it to an e-mail notification.

    CloudStorageAccount storageAccount = CloudStorageAccount.Parse(ConfigurationManager.AppSettings["StorageConnectionString"].ToString());
    CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();
    CloudBlobContainer container = blobClient.GetContainerReference("sitedata");
    foreach (Telerik.Web.UI.CloudUploadFileInfo file in RadCloudUpload1.UploadedFiles)
    CloudBlockBlob blockBlob = container.GetBlockBlobReference(file.KeyName);
    Stream mem = new MemoryStream();
    MAttach = new System.Net.Mail.Attachment(mem, file.OriginalFileName);

    I'm getting 0k attachments.  Any suggestions or thoughts?


  2. Hristo Valyavicharski
    Hristo Valyavicharski avatar
    975 posts

    Posted 18 Nov 2014 Link to this post

    Hi Richard,

    Why don't you provide a link for direct downloading:

    Hristo Valyavicharski

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top