Azure Blob 400 Bad request on Creation of container

后端 未结 12 2508
夕颜
夕颜 2020-12-15 16:26

I\'m developing an ASP.Net MVC 4 app and I\'m using Azure Blob to store the images that my users are going to upload. I have the following code:

 var storag         


        
12条回答
  •  失恋的感觉
    2020-12-15 16:52

    Mine was a stupid naming problem! Apparently we are not allowed to use uppercase in the names.

    I've just changed this:

    CloudBlobContainer container = blobClient.GetContainerReference("MyContainer");
    container.CreateIfNotExists();
    

    To

    CloudBlobContainer container = blobClient.GetContainerReference("mycontainer");
    container.CreateIfNotExists();
    

提交回复
热议问题