开发者

FLV video upload?

开发者 https://www.devze.com 2023-02-20 11:30 出处:网络
I use if($_FILE[\'type\'][\'video/flv\']) but it does not uplo开发者_StackOverflow社区ad it. Can anyone help me? I\'ll be thankful to you.Don\'t rely on $_FILES[\'somefilefield\'][\'type\']. There are

I use if($_FILE['type']['video/flv']) but it does not uplo开发者_StackOverflow社区ad it. Can anyone help me? I'll be thankful to you.


Don't rely on $_FILES['somefilefield']['type']. There are many reasons why a browser might fill it in with the 'wrong' media type. At best you can use the submitted type as an advisory for guessing what kind of file you've got, but you should never require it to match anything in particular.

In this case, most Windows desktops won't be set up to have any filetype association for the video/x-flv MIME type. So to Windows, a .flv file is nothing but an unknown binary file, and that's what it'll tell your server it's sending.


The mime type for flv is now 'video/x-flv', have a try.

0

精彩评论

暂无评论...
验证码 换一张
取 消