Commit ae092b32 authored by wangtao's avatar wangtao

Merge remote-tracking branch 'origin/bww-v1'

parents df8b7d8d 968c1773
......@@ -1076,8 +1076,8 @@ export default {
progressCallBack,
} = payload;
const file = files.files ? files.files[0] : null;
if (file && file.size > 1000 * 1024 * 1024) {
message.error('视频的大小不能超过1GB,请重新上传', 1);
if (file && file.size > 2000 * 1024 * 1024) {
message.error('视频的大小不能超过2GB,请重新上传', 1);
return;
}
const REGEXP_VIDEO = /^video\/\w+/;
......
......@@ -131,7 +131,7 @@ class ThemeEditor extends React.Component {
<div className={pageStyle.uploadimg}><input type="file" id="uploadVoice" className={pageStyle.fileuploadinput} onChange={editorUploadVoice} accept="audio/mp3" /><Icon style={{ marginRight: 10 }} type="audio" />添加录音</div>
<div className={pageStyle.uploadimg}><input type="file" id="uploadVideo" className={pageStyle.fileuploadinput} onChange={editorUploadAudio} accept="video/mp4,video/*" /><Icon style={{ marginRight: 10 }} type="video-camera" />添加视频</div>
</div>
<p className={pageStyle.tip}>请上传视频小于1G,支持MP4格式</p>
<p className={pageStyle.tip}>请上传视频小于2G,支持MP4格式</p>
<Modal visible={previewVisible} footer={null} onCancel={this.handleCancel}>
<img alt="图片" style={{ width: '100%' }} src={imagify(previewImage)} />
</Modal>
......
......@@ -140,7 +140,7 @@ class ThemeEditor extends React.Component {
<div className={pageStyle.uploadimg}><input type="file" id="uploadVoice" className={pageStyle.fileuploadinput} onChange={e => editorUploadVoice(e, sort)} accept="audio/mp3" /><Icon style={{ marginRight: 10 }} type="audio" />添加录音</div>
<div className={pageStyle.uploadimg}><input type="file" id="uploadVideo" className={pageStyle.fileuploadinput} onChange={e => editorUploadAudio(e, sort)} accept="video/mp4,video/*" /><Icon style={{ marginRight: 10 }} type="video-camera" />添加视频</div>
</div>
<p>请上传视频小于1G,支持MP4格式</p>
<p>请上传视频小于2G,支持MP4格式</p>
</div>
);
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment