Right now, the code either redirects to the public blob storage URL (because Azure Storage already supports this) after counting the download, or it surfaces the storage URL as the link and doesn't count the download. ASPNET Core already has the plumbing to do this for you, but it's worth looking at what the memory profile becomes and how you handle stream objects.