duan0818 2013-12-10 18:06
浏览 53
已采纳

资源已被删除访问Windows Azure网站上的文件

I have created a website on windows azure running CakePHP and built using the CakePHP template.

I have a ph script that allows the user to upload files to the server. When I run the script to upload an image, everything works fine, the image is uploaded to the server and I can access it via the browser. When I try to upload a .m4v video file, also everything works correctly. Accessing the uploads directory via FTP shows that the file is there but when I try to access the file via the browser I get the following messages:

The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

This error message is confusing as the files does exist, it has not been removed, and the name has not changed.

I was wondering if anyone has had a similar issue and how I can resolve it? TIA

  • 写回答

1条回答 默认 最新

  • duan19850312 2013-12-10 21:13
    关注

    I solved this problem by adding the following to the web.config file in the root directory of the site:

        <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
        <system.webServer>
            <staticContent>
                <mimeMap fileExtension=".mp4" mimeType="video/mp4" />
                <mimeMap fileExtension=".m4v" mimeType="video/m4v" />
         </staticContent>
        </system.webServer>
    </configuration>
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?