feat: 上传文件时限制扩展名
This commit is contained in:
parent
0ee978ba4e
commit
e5deab6fa2
|
@ -12,4 +12,4 @@ class SpaceSeparatedField(forms.CharField):
|
|||
|
||||
class UploadForm(forms.Form):
|
||||
attachments = MultiFileField(min_num=1, max_num=10, max_file_size=1024 * 1024 * 64,
|
||||
attrs={'class': 'file-input is-primary'})
|
||||
attrs={'class': 'file-input is-primary', 'accept': '.docx, .doc, .dot, .pptx, .ppt, .pdf, .xls'})
|
||||
|
|
Loading…
Reference in New Issue