收藏
回答

微短剧分片上传报错

框架类型 问题类型 API/组件名称 终端类型 微信版本 基础库版本
小程序 Bug vod/uploadpart 微信安卓客户端 6.5.3 2.0.0

分片上传报参数错误 {"errcode":47003,"errmsg":"argument invalid! rid: 655b0911-7b4fb4e6-2b87de17"}

HttpPost httpPost = new HttpPost(url);
httpPost.setHeader("Content-Type", "multipart/form-data; boundary=" + boundary);
MultipartEntityBuilder entityBuilder = MultipartEntityBuilder
        .create()
        //.setBoundary(boundary) 与 httpPost.setHeader 等效
        .setMode(HttpMultipartMode.RFC6532)
        .addTextBody("upload_id", vodUploadPartBean.getUploadId())
        .addTextBody("part_number", String.valueOf(vodUploadPartBean.getPartNumber()))
        .addTextBody("resource_type", String.valueOf(vodUploadPartBean.getResourceType()))
        .addBinaryBody("data", vodUploadPartBean.getData(),ContentType.APPLICATION_OCTET_STREAM,vodUploadPartBean.getFileName());

httpPost.setEntity(entityBuilder.build());


回答关注问题邀请回答
收藏
登录 后发表内容