I spent the afternoon scratching my head after moving some Flash video files from my dev machine up to the web. Being essentially multi-threaded I did do some other stuff as well so it probably wasn’t as big of a problem as I am making out. Anyway…
I uploaded the files and then the viewer application thing couldn’t access them. Within the application I was switching the source of the player by replacing its HTML in the DOM using JavaScript and thus changing the videos, at least it was supposed to. (My recent discovery of the Scriptaculous/Prototype libraries made this a joy by the way.) Because of this being a bit fancy I spent quite a while blaming that and meddling with it to no avail.
I eventually had an epiphany and checked the MIME types on the server. The gist of these is that IIS only serves files that it has a MIME type for which it matches to the file extension.
By default, .flv isn’t there and thus IIS doesn’t serve the file.
To remedy this:
- Go to the site in question in the IIS snap-in
- Right click and open the properties for the site
- Go to the HTTP Headers tab
- At the bottom of said tab is a ‘MIME Types’ button which you’ll be wanting to click at this stage
- Add a new type with the file extension .flv and the MIME type of video/x-flv.
- Press however many ‘Yes’, ‘Apply’, ‘Finish’ or ‘OK’ buttons you need to get rid of it all…
And voila… You should be in business.
I had the same problem rece3ntly trying to server .dmg (Mac .exe) files from IIS 6.
Sorted it in the end with the help of this: -
http://support.microsoft.com/default.aspx?scid=kb;en-us;326965
The kb article also shows how to add wildcard mime types. I think I would personally be a bit worried if I didn’t know what file types my server might be serving and needed to use this.
The flip side of this mime type business is that you can also prevent IIS serving files that you don’t want to make publicly available by removing their extension, or not adding it. I imagine this is how we keep the .config and .cs files to ourselves.
how come I’ve seen the mime-type listed as flv-application/octet-stream in other parts of the web? Anyone know the difference?
Hi Johnny
I don’t know the difference but I do know that video/x-flv certainly works
Graham
Thanks a bunch for this!
Uooollllll… very good.
My site is working now!
Thanks!
Nice! Years later and its still helpful!
Thanks!
Thanks a lot, so simple and never figured it. ¡¡¡Great work!!!
hi Ive done the instructions above, but when i play the FLV video it si overcompressed, regardless the fact that i uploaded the original file, and when i download the flv from the web, its smaller file size than the original. What shold I do?
Thanks in advance