Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

上传组件JUpload配置beforeUpload阻止了上传,前端页面中还是显示该缩略图 #6357

Closed
q060831 opened this issue May 24, 2024 · 2 comments

Comments

@q060831
Copy link

q060831 commented May 24, 2024

版本号:3.6.3

问题描述:
上传组件JUpload配置beforeUpload阻止了上传,前端页面中还是显示该缩略图。

截图&代码:
例如:

  {
    label: '图片',
    field: 'logo',
    component: 'JUpload',
    componentProps: {
      multiple: false,
      bizPath: 'sale/customer/info/logo',
      fileType: UploadTypeEnum.image,
      maxCount: 1,
      replaceLastOne: true,
      beforeUpload: (file) => {
        console.log(file.size, file.size > 512 * 1024);
        if (file.size > 512 * 1024) {
          return Promise.reject('请上传小于 512 KB的图片!');
          // return false;
        }
        return true;
      },
    },
  },

Dingtalk_20240524112804

自行解决的方法:
upload

@qinghechaoge
Copy link

解决了吗?

@zhangdaiscott
Copy link
Member

zy

@zhangdaiscott zhangdaiscott transferred this issue from jeecgboot/JeecgBoot-vue3 Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants