소스 검색

草图上传

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