|
|
@@ -303,11 +303,7 @@ public class OpenApiClient {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- public void publishVideoPost(File coverFile, File videoFile) throws Exception {
|
|
|
- ServerInfo serverInfo1 = getServerInfo("image");
|
|
|
- UploadFileRet uploadFileRet1 = putFile(serverInfo1.getOssUrl(), serverInfo1.getToken(), Path.of(coverFile.getPath()));
|
|
|
- String coverFileId = uploadFileRet1.getUploadId();
|
|
|
-
|
|
|
+ public void publishVideoPost(int categoryPid, int categoryId, File coverFile, File videoFile) throws Exception {
|
|
|
ServerInfo serverInfo2 = getServerInfo("video");
|
|
|
int channelCode = serverInfo2.getChannelCode();
|
|
|
UploadFileRet uploadFileRet2 = uploadFilePart(channelCode, serverInfo2.getOssUrl(), serverInfo2.getToken(), Path.of(videoFile.getPath()));
|
|
|
@@ -324,14 +320,12 @@ public class OpenApiClient {
|
|
|
throw new RuntimeException("post failed: " + webResult.getMsg());
|
|
|
}
|
|
|
String videoId = webResult.getData();
|
|
|
+ updateVideoCover(videoId, coverFile);
|
|
|
|
|
|
- int categoryPid = 11;
|
|
|
- int categoryId = 19;
|
|
|
int scope = 3;
|
|
|
String title = videoFile.getName();
|
|
|
Map<String, Object> map1 = new HashMap<>();
|
|
|
map1.put("videoId", videoId);
|
|
|
- map1.put("coverFileId", coverFileId);
|
|
|
map1.put("title", title);
|
|
|
map1.put("description", videoFile.getName());
|
|
|
map1.put("categoryPid", categoryPid);
|