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

上传图片和视频时获取不到上传进度 #499

Open
TWY-9238944 opened this issue Jul 2, 2024 · 2 comments
Open

上传图片和视频时获取不到上传进度 #499

TWY-9238944 opened this issue Jul 2, 2024 · 2 comments

Comments

@TWY-9238944
Copy link

调用uploadMedia上传图片时,progress没有返回上传进度,需要做加载动画,所以希望能拿到上传进度

@heavyrain2012
Copy link
Collaborator

在协议中的实现是,数据分批拷贝到socket中,当总体大小大于50KB且没有全部拷贝完成时,回调上传进度。在不同的平台socket的buffer大小是不一样的,在iOS手机上buffer大小大概是200KB,所以如果测试上传进度,请确保上传的文件较大,可以测试一下,上传2MB的图片

@heavyrain2012
Copy link
Collaborator

选择图片发送,可能会有压缩和裁剪,可以在上传前打印一下大小的日志,确保文件足够大

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