<input type="file" @change="demo">
if(e.target.files[0]&&e.target.files[0].type.indexOf("mp4")!=-1){//檢查視頻
console.log("e",e.target.files[0].type);//這個就是binary流
//接口
fileUpload({
// 轉換為
file: e.target.files[0]
}).then(res=>{
if( res.success==true){
// console.log(res);
this.getterVideohttp(res.data);
this.videoPass=res.data;
}
})
}else{
this.$notify({
message: "請上傳video/mp4",
type: 'success',
duration: 1500
})
return
}