|
@@ -17,7 +17,9 @@ type ListHeaderProps = {
|
|
|
export const SceneHeader = memo(({ readonly, type, onSearch, onDataChange }: ListHeaderProps) => {
|
|
|
const dispatch = useDispatch()
|
|
|
const onUpload: UploadProps['beforeUpload'] = file => {
|
|
|
- const isZip = ['application/zip', 'application/rar'].includes(file.type)
|
|
|
+ const filename = file.name
|
|
|
+ const ext = filename.substring(filename.lastIndexOf('.'))
|
|
|
+ const isZip = ['.zip', '.rar'].includes(ext)
|
|
|
if (!isZip) {
|
|
|
message.error('只能上传zip或rar文件')
|
|
|
return Upload.LIST_IGNORE
|