我们正在使用Retrofit多部分来进行文件上传过程。
我们希望在文件上传时能够暂停/恢复上传。
我想知道这是否可能?
多部分文件上传的代码
RequestBody requestFile =
RequestBody.create(MediaType.parse("multipart/form-data"), file);
// MultipartBody.Part is used to send also the actual file name
MultipartBody.Part body =MultipartBody.Part.createFormData("image", file.getName(), requestFile);
Call<ResponseBody> call= api.uploadFile(body);