|
|
|
@ -23,9 +23,15 @@ function VideoUploadList (props) {
|
|
|
|
|
function onUploadChange (e) {
|
|
|
|
|
var file = e.target.files[0]
|
|
|
|
|
if (!file) {
|
|
|
|
|
alert("请先选择需要上传的文件!")
|
|
|
|
|
// alert("请先选择需要上传的文件!")
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if (file.size > 200 * 1024 * 1024) {
|
|
|
|
|
// 超过200m TODO
|
|
|
|
|
alert("视频大小超过200M")
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TODO 判断文件类型
|
|
|
|
|
var Title = file.name
|
|
|
|
|
file.type
|
|
|
|
@ -203,7 +209,9 @@ function VideoUploadList (props) {
|
|
|
|
|
<Button type="primary" icon="plus-square" onClick={() => { document.getElementById('fileUpload').click()}}>
|
|
|
|
|
添加更多视频
|
|
|
|
|
</Button>
|
|
|
|
|
<input type="file" id="fileUpload" style={{display: 'none'}} onChange={onUploadChange}></input>
|
|
|
|
|
<input type="file" id="fileUpload" style={{display: 'none'}} onChange={onUploadChange}
|
|
|
|
|
accept="video/*"
|
|
|
|
|
></input>
|
|
|
|
|
|
|
|
|
|
<ActionBtn className="publishBtn" onClick={() => onPublish()}>立即发布</ActionBtn>
|
|
|
|
|
</div>
|
|
|
|
|