private static bool IsVideo(HttpPostedFile file)
        {
            bool isVideo = false;
            string fileName = file.FileName;
            IList<string> formateList = new List<string> { 
               "avi","flv","mpg","mpeg","mpe","m1v","m2v","mpv2","mp2v","dat","ts","tp","tpr","pva","pss","mp4","m4v",
                "m4p","m4b","3gp","3gpp","3g2","3gp2","ogg","mov","qt","amr","rm","ram","rmvb","rpm"};
            if (formateList.Contains(fileName.Split('.')[1]))
            {
                isVideo = true;
            }
            return isVideo;
        }

 

相关文章:

  • 2022-12-23
  • 2021-09-03
  • 2021-05-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-05-17
  • 2021-10-19
  • 2022-12-23
  • 2022-01-01
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案