dongmijgnnq0118 2017-11-07 15:49
浏览 60
已采纳

Azure .mp4上传失败

Good Morning,

We have setup a Laravel project on an Azure App Service. Were working on the ability to upload .mp4 files. If we try to upload .zip, .jpg, .doc etc they all work without fail. The .mp4 files though always give a error. Most of the answers we've found say its the web.config but we think its correct. Heres some info:

Error we get: 404 Not Found: The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

My web.config file location is: D:\home\site\wwwroot\public\web.config

My upload directory is: D:\home\site\wwwroot\public\test

My web.config looks like:

<configuration>
  <system.webServer>
    <staticContent>
      <mimeMap fileExtension=".mp4" mimeType="application/octet-stream" />
      <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
    </staticContent>
    <handlers accessPolicy="Read, Script">
      <add name="PHP71_via_FastCGI" path="*.php" verb="GET, HEAD, POST, PUT, DELETE, PATCH, OPTIONS" modules="FastCgiModule" scriptProcessor="D:\Program Files (x86)\PHP\v7.1\php-cgi.exe"
        resourceType="Either" requireAccess="Script" />
      <remove name="ExtensionlessUrl-Integrated-4.0" />
      <add name="ExtensionlessUrl-Integrated-4.0" path="*." verb="GET,HEAD,POST,DEBUG,DELETE,PUT,PATCH,OPTION" type="System.Web.Handlers.TransferRequestHandler"
        preCondition="integratedMode,runtimeVersionv4.0" />
    </handlers>
    <rewrite>
      <rules>
        <rule name="Imported Rule 1" stopProcessing="true">
          <match url="^(.*)/$" ignoreCase="false" />
          <conditions>
            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
          </conditions>
          <action type="Redirect" redirectType="Permanent" url="/{R:1}" />
        </rule>
        <rule name="Imported Rule 2" stopProcessing="true">
          <match url="^" ignoreCase="false" />
          <conditions>
            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
            <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
          </conditions>
          <action type="Rewrite" url="index.php" />
        </rule>
      </rules>
    </rewrite>
  </system.webServer>
</configuration>

As you can see we have the mimeMap in there. We've tried both application/octet-stream and video/mp4. Anyone have any thoughts/ideas? We tried placing the web.config in other folders as well with the same issue.

One other thing I tried was going into Kodu and manually uploading the file through there. It worked but if you try to access the .mp4 it shows the same error as when I'm trying to upload through the site.

  • 写回答

1条回答 默认 最新

      报告相同问题?

      相关推荐 更多相似问题

      悬赏问题

      • ¥15 ubuntu18.04 tty报错&tty界面su/sudo命令无法执行,如何解决?
      • ¥20 关于c语言网络编程,实现传文件和即时聊天
      • ¥20 下面的压缩方法是否可行
      • ¥15 结构体数组读取文件信息失败,读取不了
      • ¥15 kaldi thchs30 训练遇到问题
      • ¥15 shellter无法使用,如何解决?(操作系统-kali)
      • ¥15 matlab动态模态分解程序
      • ¥60 关于渗透及远控的几个问题
      • ¥15 python文本词汇出现次数统计
      • ¥15 使用按键和串口,记录按键在不消抖的情况下触发的次数