Tracking progress of multipart file upload using OKHTTP

后端 未结 3 1024
[愿得一人]
[愿得一人] 2020-11-30 18:19

I am trying to implement a a progress bar to indicate the progress of a multipart file upload.

I have read from a comment on this answer - https://stackoverflow.com/

3条回答
  •  悲哀的现实
    2020-11-30 18:55

    This thing works great!

    Gradle

    dependencies {
      compile 'io.github.lizhangqu:coreprogress:1.0.2'
    }
    
    //wrap your original request body with progress
    RequestBody requestBody = ProgressHelper.withProgress(body, new ProgressUIListener()....} 
    

    Full example code here https://github.com/lizhangqu/CoreProgress

提交回复
热议问题