Upload Picture to Windows Azure Web Site

后端 未结 4 1077
终归单人心
终归单人心 2020-12-08 05:49

I have an ASP.NET MVC 4 app that i want to deploy to Windows Azure. A part of this app involves uploading a picture. When the picture is uploaded, I want to store the pictur

4条回答
  •  误落风尘
    2020-12-08 06:26

    Data and images are not meant to be stored in website directory. That's why there is the Azure Blob Storage.

    Azure works by copying the website out to an instance, so if more than one instance exists then uploaded images (which are stored local to the instance) will become out of sync, you will even loose images if there are conflicts.

    If you really want to do it the line below will give you what you want:

    string path = Server.MapPath("~/pictures/uploaded");
    

提交回复
热议问题