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 #MATLAB仿真#车辆换道路径规划
  • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
  • ¥15 数据可视化Python
  • ¥15 要给毕业设计添加扫码登录的功能!!有偿
  • ¥15 kafka 分区副本增加会导致消息丢失或者不可用吗?
  • ¥15 微信公众号自制会员卡没有收款渠道啊
  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘