浏览代码

草图上传

laiguoran 5 年之前
父节点
当前提交
336eb96090
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/public/js/stage_detail.js

+ 1 - 1
app/public/js/stage_detail.js

@@ -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