meloncholy / vid-streamer

VidStreamer.js: A simple streamer for Flash and HTML5-style videos. Supports HTTP pseudostreaming and works with JW Player's bitrate switching.
http://meloncholy.com
384 stars 64 forks source link

Naming Issue 2 #7

Closed soulcyon closed 11 years ago

soulcyon commented 11 years ago

When using a file with multiple [period] in the name, vid-streamer throws a "BadMime" error. I'm assuming the mimeType check is incomplete/incorrect.

I suggest utilizing the mime NodeJS plugin. https://github.com/broofa/node-mime

Or allowing users to specify what types of mimes are allowed. For now, I just commented the if-statement out since all my files are only WebM.

meloncholy commented 11 years ago

Yes, my bad again. The regex was being greedy, which obviously wasn't a good thing. I've also told it not to reject extensions if they're the wrong case (though whether a file is returned or not depends on the OS's rules).

I took a quick look at the plugin, but it seems a little bit like overkill for this simple situation.