|
@@ -574,7 +574,7 @@ $(document).ready(() => {
|
|
|
$('#upload-img-file').change(function () {
|
|
|
const file = this.files[0];
|
|
|
const ext = file.name.toLowerCase().split('.').splice(-1)[0];
|
|
|
- const imgStr = /\.(jpg|jpeg|png|bmp|BMP|JPG|PNG|JPEG)$/;
|
|
|
+ const imgStr = /(jpg|jpeg|png|bmp|BMP|JPG|PNG|JPEG)$/;
|
|
|
if (!imgStr.test(ext)) {
|
|
|
toast('请上传正确的图片格式文件', 'error');
|
|
|
return
|