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>
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 求差集那个函数有问题,有无佬可以解决
  • ¥15 【提问】基于Invest的水源涵养
  • ¥20 微信网友居然可以通过vx号找到我绑的手机号
  • ¥15 寻一个支付宝扫码远程授权登录的软件助手app
  • ¥15 解riccati方程组
  • ¥15 display:none;样式在嵌套结构中的已设置了display样式的元素上不起作用?
  • ¥15 使用rabbitMQ 消息队列作为url源进行多线程爬取时,总有几个url没有处理的问题。
  • ¥15 Ubuntu在安装序列比对软件STAR时出现报错如何解决
  • ¥50 树莓派安卓APK系统签名
  • ¥65 汇编语言除法溢出问题