locked
I can't upload image on azure website RRS feed

  • Question

  • Hi,

    I try to upload picture to azure website, but I receive an error :

    Could not find a part of the path 

    I read that It is possible to upload only to root directory in azure but I have MVC application and try to save the file on Content folder. Is there some workaround.

    I appreciate any help in advance. 

    Friday, November 21, 2014 9:32 AM

Answers

  • Hello Ivo Atansov,

    The Data and the images are not meant to be stored in the webroot directory. You should be able to use blobs to upload your images and data. You can refer to this link that will give you information on how to accomplish this:

    http://azure.microsoft.com/en-us/documentation/articles/storage-dotnet-how-to-use-blobs/


    Howerver, if you still like to save it to the root directory, the error message indicates that the path in which you have stored your image is not correct.

    Check the path in which the image is loaded, check if there is double slash. If this does not work, please share the part of the code which you have used to upload images to webroot directory.

    Thanks,
    Syed Irfan Hussain

    Friday, November 21, 2014 11:39 AM

All replies

  • Hello Ivo Atansov,

    The Data and the images are not meant to be stored in the webroot directory. You should be able to use blobs to upload your images and data. You can refer to this link that will give you information on how to accomplish this:

    http://azure.microsoft.com/en-us/documentation/articles/storage-dotnet-how-to-use-blobs/


    Howerver, if you still like to save it to the root directory, the error message indicates that the path in which you have stored your image is not correct.

    Check the path in which the image is loaded, check if there is double slash. If this does not work, please share the part of the code which you have used to upload images to webroot directory.

    Thanks,
    Syed Irfan Hussain

    Friday, November 21, 2014 11:39 AM
  • Hi Ivo,

    In Azure websites,we don't have permission to store the file into the server root directory.

    You can save your image file in the content folder, but If your website instance restart ,the data  will  lose.

    I suggest that you can  try to use the Azure  Blob storage to store the image or other files.

    Best Regards,

    Kevin Shen.


    Monday, November 24, 2014 7:14 AM