当我使用文件上传功能上传.mp4扩展名的音频和视频文件时,成功控制其上传,但在创建该文件的缩略图时很难区分是音频还是视频。
Try identifying MIME of file. In other words content-type:
string contentType = flFile.PostedFile.ContentType;
if("video/mp4" == contentType.ToLower()){
//its video
}else if("audio/mp4" == contentType.ToLower()){
//its audio
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.