Accept audio and pdf as resource.

This commit is contained in:
Yang Luo
2021-10-03 22:08:18 +08:00
parent 15786070bb
commit 8cb1291f6f

View File

@ -78,7 +78,7 @@ class ResourceListPage extends React.Component {
renderUpload() { renderUpload() {
return ( return (
<Upload maxCount={1} accept="image/*,video/*" showUploadList={false} <Upload maxCount={1} accept="image/*,video/*,audio/*,.pdf" showUploadList={false}
beforeUpload={file => {return false}} onChange={info => {this.handleUpload(info)}}> beforeUpload={file => {return false}} onChange={info => {this.handleUpload(info)}}>
<Button icon={<UploadOutlined />} loading={this.state.uploading} type="primary" size="small"> <Button icon={<UploadOutlined />} loading={this.state.uploading} type="primary" size="small">
{i18next.t("resource:Upload a file...")} {i18next.t("resource:Upload a file...")}