|
|
@@ -42,7 +42,7 @@ public class OssConsoleClient {
|
|
|
.addPart("accessKeyId", accessKeyId)
|
|
|
.addPart("accessKeySecret", accessKeySecret);
|
|
|
|
|
|
- String api = String.format("%s/api/oss/key/auth", endpoint);
|
|
|
+ String api = String.format("%s/bg/api/oss/key/auth", endpoint);
|
|
|
HttpRequest httpRequest = HttpRequest.newBuilder(new URI(api))
|
|
|
.version(HttpClient.Version.HTTP_1_1)
|
|
|
.header("content-type", "multipart/form-data; boundary=" + publisher.getBoundary())
|
|
|
@@ -71,7 +71,7 @@ public class OssConsoleClient {
|
|
|
// oss-store 相关接口
|
|
|
// ****************************************************************************************************************
|
|
|
public ServerInfo getUploadStore(int channelCode) throws Exception {
|
|
|
- String api = String.format("%s/api/oss/upload/store?channelCode=%s", endpoint, channelCode);
|
|
|
+ String api = String.format("%s/bg/api/oss/upload/store?channelCode=%s", endpoint, channelCode);
|
|
|
HttpRequest httpRequest = HttpRequest.newBuilder(new URI(api))
|
|
|
.header("authorization", "Bearer " + token)
|
|
|
.version(HttpClient.Version.HTTP_1_1)
|
|
|
@@ -101,7 +101,7 @@ public class OssConsoleClient {
|
|
|
formData.put("scope", scope+"");
|
|
|
formData.put("objectId", objectId);
|
|
|
|
|
|
- String api = String.format("%s/api/oss/object/scope", endpoint);
|
|
|
+ String api = String.format("%s/bg/api/oss/object/scope", endpoint);
|
|
|
HttpRequest httpRequest = HttpRequest.newBuilder(new URI(api))
|
|
|
.header("authorization", "Bearer " + token)
|
|
|
.headers("content-type", "application/x-www-form-urlencoded")
|
|
|
@@ -142,7 +142,7 @@ public class OssConsoleClient {
|
|
|
formData.put("channelCode", channelCode+"");
|
|
|
formData.put("objectId", objectId);
|
|
|
|
|
|
- String api = String.format("%s/api/oss/object/delete/id", endpoint);
|
|
|
+ String api = String.format("%s/bg/api/oss/object/delete/id", endpoint);
|
|
|
HttpRequest httpRequest = HttpRequest.newBuilder(new URI(api))
|
|
|
.header("authorization", "Bearer " + token)
|
|
|
.headers("content-type", "application/x-www-form-urlencoded")
|
|
|
@@ -169,7 +169,7 @@ public class OssConsoleClient {
|
|
|
Map<String, String> formData = new HashMap<>();
|
|
|
formData.put("objectUrl", objectUrl);
|
|
|
|
|
|
- String api = String.format("%s/api/oss/object/delete/url", endpoint);
|
|
|
+ String api = String.format("%s/bg/api/oss/object/delete/url", endpoint);
|
|
|
HttpRequest httpRequest = HttpRequest.newBuilder(new URI(api))
|
|
|
.header("authorization", "Bearer " + token)
|
|
|
.headers("content-type", "application/x-www-form-urlencoded")
|
|
|
@@ -193,7 +193,7 @@ public class OssConsoleClient {
|
|
|
}
|
|
|
|
|
|
public ObjectInfo getObjectInfo(int channelCode, String objectId) throws Exception {
|
|
|
- String api = String.format("%s/api/oss/object/info?channelCode=%s&objectId=%s", endpoint, channelCode, objectId);
|
|
|
+ String api = String.format("%s/bg/api/oss/object/info?channelCode=%s&objectId=%s", endpoint, channelCode, objectId);
|
|
|
HttpRequest httpRequest = HttpRequest.newBuilder(new URI(api))
|
|
|
.header("authorization", "Bearer " + token)
|
|
|
.version(HttpClient.Version.HTTP_1_1)
|
|
|
@@ -216,7 +216,7 @@ public class OssConsoleClient {
|
|
|
}
|
|
|
|
|
|
public String getSignedUrl(int channelCode, String objectId) throws Exception {
|
|
|
- String api = String.format("%s/api/oss/object/url?channelCode=%s&objectId=%s", endpoint, channelCode, objectId);
|
|
|
+ String api = String.format("%s/bg/api/oss/object/url?channelCode=%s&objectId=%s", endpoint, channelCode, objectId);
|
|
|
HttpRequest httpRequest = HttpRequest.newBuilder(new URI(api))
|
|
|
.header("authorization", "Bearer " + token)
|
|
|
.version(HttpClient.Version.HTTP_1_1)
|
|
|
@@ -243,7 +243,7 @@ public class OssConsoleClient {
|
|
|
// 媒体文件信息相关接口
|
|
|
// ****************************************************************************************************************
|
|
|
public VideoInfo getVideoInfo(int channelCode, String objectId) throws Exception {
|
|
|
- String api = String.format("%s/api/oss/object/video/info?channelCode=%s&objectId=%s", endpoint, channelCode, objectId);
|
|
|
+ String api = String.format("%s/bg/api/oss/object/video/info?channelCode=%s&objectId=%s", endpoint, channelCode, objectId);
|
|
|
HttpRequest httpRequest = HttpRequest.newBuilder(new URI(api))
|
|
|
.header("authorization", "Bearer " + token)
|
|
|
.version(HttpClient.Version.HTTP_1_1)
|
|
|
@@ -266,7 +266,7 @@ public class OssConsoleClient {
|
|
|
}
|
|
|
|
|
|
public ImageInfo getImageInfo(int channelCode, String objectId) throws Exception {
|
|
|
- String api = String.format("%s/api/oss/object/image/info?channelCode=%s&objectId=%s", endpoint, channelCode, objectId);
|
|
|
+ String api = String.format("%s/bg/api/oss/object/image/info?channelCode=%s&objectId=%s", endpoint, channelCode, objectId);
|
|
|
HttpRequest httpRequest = HttpRequest.newBuilder(new URI(api))
|
|
|
.header("authorization", "Bearer " + token)
|
|
|
.headers("content-type", "application/x-www-form-urlencoded")
|
|
|
@@ -294,7 +294,7 @@ public class OssConsoleClient {
|
|
|
formData.put("channelCode", ""+channelCode);
|
|
|
formData.put("objectId", objectId);
|
|
|
|
|
|
- String api = String.format("%s/api/oss/object/image/webp", endpoint);
|
|
|
+ String api = String.format("%s/bg/api/oss/object/image/webp", endpoint);
|
|
|
HttpRequest httpRequest = HttpRequest.newBuilder(new URI(api))
|
|
|
.header("authorization", "Bearer " + token)
|
|
|
.headers("content-type", "application/x-www-form-urlencoded")
|
|
|
@@ -318,7 +318,7 @@ public class OssConsoleClient {
|
|
|
}
|
|
|
|
|
|
public AudioInfo getAudioInfo(int channelCode, String objectId) throws Exception {
|
|
|
- String api = String.format("%s/api/oss/object/audio/info/?channelCode=%s&objectId=%s", endpoint, channelCode, objectId);
|
|
|
+ String api = String.format("%s/bg/api/oss/object/audio/info/?channelCode=%s&objectId=%s", endpoint, channelCode, objectId);
|
|
|
HttpRequest httpRequest = HttpRequest.newBuilder(new URI(api))
|
|
|
.header("authorization", "Bearer " + token)
|
|
|
.version(HttpClient.Version.HTTP_1_1)
|
|
|
@@ -344,12 +344,12 @@ public class OssConsoleClient {
|
|
|
// 音视频转码相关接口
|
|
|
// ****************************************************************************************************************
|
|
|
public void convertAudio(String audioFileId) throws Exception {
|
|
|
- String api = String.format("%s/api/oss/object/convert/audio/%s", endpoint, audioFileId);
|
|
|
+ String api = String.format("%s/bg/api/oss/object/convert/audio/%s", endpoint, audioFileId);
|
|
|
convert(api);
|
|
|
}
|
|
|
|
|
|
public void convertVideo(String videoFileId) throws Exception {
|
|
|
- String api = String.format("%s/api/oss/object/convert/video/%s", endpoint, videoFileId);
|
|
|
+ String api = String.format("%s/bg/api/oss/object/convert/video/%s", endpoint, videoFileId);
|
|
|
convert(api);
|
|
|
}
|
|
|
|