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

EasyPhoto提示:保存时发生错误,保存失败 #11

Open
light-speak opened this issue Feb 7, 2020 · 1 comment
Open

EasyPhoto提示:保存时发生错误,保存失败 #11

light-speak opened this issue Feb 7, 2020 · 1 comment

Comments

@light-speak
Copy link

light-speak commented Feb 7, 2020

MIUI 版本:11.20.1.21开发版
Android 版本: 10

           val photo = EasyPhoto()
                .setCrop(true)
            photo.setCallback {
                val requestBody = it.asRequestBody()
                val multipartBody = MultipartBody.Builder()
                    .setType(MultipartBody.FORM)
                    .addFormDataPart("avatar", it.name, requestBody)
                    .build()
                mPresenter?.avatar(multipartBody.parts[0])
            }
            photo.setError {
                EasyLog.DEFAULT.e(it)
                EasyToast.DEFAULT.show(it.message)
            }
            photo.selectPhoto(getHostActivity())
@light-speak
Copy link
Author

在选择剪辑图片的时候,无异常抛出
取消剪辑图片,抛出权限异常
阅读文档发现:
image
so..
image
问题解决

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

1 participant