Skip to content

sdk本地推文件上传接口LocalFileVideoUploadV30Api该怎么用 #17

@duskfraud

Description

@duskfraud

最新版本的sdk,上传使用本地文件地址和oss云端地址都, 都会报视频签名校验失败, 求大大看下:

代码:

        ApiClient apiClient = new ApiClient();
        apiClient.addDefaultHeader("Access-Token", "xxxxxxxxxxxxxxxxxxxxxxxxx");
        String filename = "2025-10-27上传测试.mp4";
        String localPath = "D:\\Users\\Downloads\\final_video_plan_1.mp4";

        LocalFileVideoUploadV30Api api = new LocalFileVideoUploadV30Api(apiClient);
        LocalFileVideoUploadV30RequestVideoFile videoFile = new LocalFileVideoUploadV30RequestVideoFile();
        videoFile.setData(new File(localPath));
        videoFile.setFileName("final_video_plan_1.mp4");
        String videoSignature = DigestUtils.md5DigestAsHex(Files.newInputStream(Path.of(localPath)));
        System.out.println(videoSignature);
        LocalFileVideoUploadV30Response detailV30Response = api.openApiV30LocalFileVideoUploadPost(filename, 11111111111111L, videoFile, videoSignature);
        System.out.println(JSON.toJSONString(detailV30Response));

响应:
{"code":400173,"message":"视频签名校验失败,请检查视频MD5与传入的signature是否匹配","requestId":"20251027173003AD24EB5FCEDE20CFE11C"}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions