| | |
| | | accepts = ['.jpg', '.png', '.gif', '.jpeg'] |
| | | accept = accepts.join(',') |
| | | } else if (config.suffix) { |
| | | accepts = config.suffix.split(',') |
| | | accept = config.suffix |
| | | accepts = config.suffix.split(',').map(item => { |
| | | if (!/^\./ig.test(item)) { |
| | | item = '.' + item |
| | | } |
| | | return item |
| | | }) |
| | | accept = accepts.join(',') |
| | | } |
| | | let rduri = config.rduri || '' |
| | | |
| | |
| | | form.append('shardingCnt', param.chunks) |
| | | form.append('shardingNo', param.chunk) |
| | | form.append('LoginUID', sessionStorage.getItem('LoginUID') || '') |
| | | form.append('UserID', sessionStorage.getItem('UserID') || '') |
| | | |
| | | Api.getLargeFileUpload(form).then(res => { |
| | | if (res.status) { |
| | |
| | | }) |
| | | |
| | | if (!pass) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '文件格式错误!', |
| | | duration: 5 |
| | | }) |
| | | return |
| | | setTimeout(() => { |
| | | this.onFail('文件格式错误!') |
| | | }, 10) |
| | | return false |
| | | } |
| | | } |
| | | |