Reputation: 2474
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
Upvotes: 1
Views: 1605
Reputation: 2474
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>
Upvotes: 1