Abhijeet Panpatil

Abhijeet Panpatil

  • NA
  • 95
  • 20.7k

c# , MVC, Azure blob

Mar 20 2018 7:41 AM
I'm try to display the name of the blobs store in container.
I tried the following. 
 
 
public ActionResult ViewComedyMovies()
{
CloudBlobContainer blobContainer = _blobStorageService.GetCloudBlobContainer();
List<string> blobs = new List<string>();
foreach (var blobItem in blobContainer.ListBlobs())
{
blobs.Add(blobItem.Uri.ToString());
}
return View(blobs);
}
 
 
But it gives the storage uri as output:- 
  • https://moviestarstorage.blob.core.windows.net/comedy-movies/abhijeet.mp4 
 i want only "abhijeet.mp4" in output

Answers (1)