This has taken a while to track down.
I have this code that works
CloudBlobClient cloudBlobClient = storageAccount.CreateCloudBlobClient();
var uploadedContainer = cloudBlobClient.GetContainerReference("uploadedfiles");
uploadedContainer.CreateIfNotExists(new BlobRequestOptions() { RetryPolicy = new NoRetry() }, null);
var directory = uploadedContainer.GetDirectoryReference(path);
CloudBlockBlob cloudBlockBlob = directory.GetBlockBlobReference($"dave.pdf");
but if I change the last line to the following my blob trigger blows up in the function
CloudBlockBlob cloudBlockBlob = directory.GetBlockBlobReference($"{Guid.NewGuid().ToString()}.pdf");
Very frustrating. The error is :
[18/10/2019 14:37:36] An unhandled exception has occurred. Host is shutting down. [18/10/2019 14:37:36] Microsoft.WindowsAzure.Storage: Server encountered an internal error. Please try again after some time.
Great use of error message - thanks!
I want to be able to use a guid here. The docs for naming conventions seem to say this is a legal situation found here
someone must have an idea!
the following filenames work
"s-a"
"dave.pdf"
$"{Guid.New().ToString()}"
This does not work
$"{Guid.New().ToString()}.pdf"