private Uri GenerateUriForFile(string url, string filePath) { // Get the file name (will be used to name the container i.e. files names must be unique or they will be overwritten) string fileName = Path.GetFileName(filePath); // Added the filename to the uri var str = BlobUri.Split('?'); var newUri = str[0] + "/" + fileName + "?" + str[1]; // Generate Uri object return(new Uri(newUri)); }