|
|
@@ -25,11 +25,11 @@ public class OssConsoleClientTest {
|
|
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
String consoleUrl = "http://ossconsole.reghao.cn";
|
|
|
- String accessKeyId = "z9mtelCi";
|
|
|
- String accessKeySecret = "mX7dO8zC8dokThJOC2";
|
|
|
+ String accessKeyId = "mWYMpbrL";
|
|
|
+ String accessKeySecret = "uvuTJKKbRfaSxNPM38";
|
|
|
OssConsoleClient ossConsoleClient = new OssConsoleClient(consoleUrl, accessKeyId, accessKeySecret);
|
|
|
|
|
|
- int channelId = 108;
|
|
|
+ int channelId = 101;
|
|
|
ServerInfo serverInfo = ossConsoleClient.getServerInfo(channelId);
|
|
|
if (serverInfo == null) {
|
|
|
log.info("获取 server_info 失败");
|
|
|
@@ -38,11 +38,6 @@ public class OssConsoleClientTest {
|
|
|
String ossUrl = serverInfo.getOssUrl();
|
|
|
String token = serverInfo.getToken();
|
|
|
|
|
|
- /*int scope = 1;
|
|
|
- String objectId = "dafafafa";
|
|
|
- int contentType = 1001;
|
|
|
- ossConsoleClient.setObjectScope(scope, objectId, contentType);*/
|
|
|
-
|
|
|
OssStoreClient ossStoreClient = new OssStoreClient(ossUrl);
|
|
|
String filePath = "/home/reghao/data/video/output.mp4";
|
|
|
File file = new File(filePath);
|
|
|
@@ -58,5 +53,10 @@ public class OssConsoleClientTest {
|
|
|
|
|
|
/*String sha256sum = "1234567890";
|
|
|
storeClient.headObject1(sha256sum);*/
|
|
|
+
|
|
|
+ /*int scope = 1;
|
|
|
+ String objectId = "dafafafa";
|
|
|
+ int contentType = 1001;
|
|
|
+ ossConsoleClient.setObjectScope(scope, objectId, contentType);*/
|
|
|
}
|
|
|
}
|