Ejemplo n.º 1
0
        public async Task Post([FromBody] IFormFile file)
        {
            BlobClass blob = new BlobClass();

            try
            {
                await blob.Post(file);
            }
            catch
            {
            }
        }
Ejemplo n.º 2
0
        async public Task <FileStreamResult> Get(string name)
        {
            BlobClass blob = new BlobClass();

            MemoryStream   stream    = new MemoryStream();
            CloudBlockBlob cloudBlob = blob.Get(name);
            await cloudBlob.DownloadToStreamAsync(stream);

            stream.Position = 0;
            // fill stream from blob
            return(new FileStreamResult(stream, cloudBlob.Properties.ContentType));
        }