Browse Source

草图上传

laiguoran 5 năm trước cách đây
mục cha
commit
336eb96090
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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