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

建议选择限制文件大小回调增加type区分排除类型 #2469

Closed
eurigo opened this issue Aug 30, 2022 · 0 comments
Closed

建议选择限制文件大小回调增加type区分排除类型 #2469

eurigo opened this issue Aug 30, 2022 · 0 comments

Comments

@eurigo
Copy link

eurigo commented Aug 30, 2022

Current use version?

当前使用的版本是多少?

3.10.6


Will this problem occur in demo?

Demo能否复现这问题?


Describe the problem or provide an error log?

描述问题或提供错误log?

设置图片视频同选后,再设置setSelectLimitTipsListener()回调,会同时限制选择的图片、视频的大小。

例:需求限制图片大小≤5M、视频小于30秒,如果视频大于5M,会被大小限制拦截

if (config.selectMaxFileSize > 0) {
            if (fileSize > config.selectMaxFileSize) {
                if (PictureSelectionConfig.onSelectLimitTipsListener != null) {
                    boolean isSelectLimit = PictureSelectionConfig.onSelectLimitTipsListener
                            .onSelectLimitTips(getAppContext(), config,
                                    SelectLimitType.SELECT_MAX_FILE_SIZE_LIMIT);
                    if (isSelectLimit) {
                        return true;
                    }
                }
                String maxFileSize = PictureFileUtils.formatFileSize(config.selectMaxFileSize);
                showTipsDialog(getString(R.string.ps_select_max_size, maxFileSize));
                return true;
            }
        }
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

2 participants