|
@@ -17,8 +17,8 @@ import java.io.Serializable;
|
|
|
public class OSSService implements Serializable {
|
|
|
private String accessId = "LTAI5tHMkNaRhpiDB1yWMZPn";
|
|
|
private String accessKey = "XLi5YUJusVwbbQOaGeGsaRJ1Qyzbui";
|
|
|
- private String endpoint = "https://oss-cn-hangzhou-internal.aliyuncs.com";
|
|
|
- //private String endpoint = "https://oss-cn-hangzhou.aliyuncs.com";
|
|
|
+ //private String endpoint = "https://oss-cn-hangzhou-internal.aliyuncs.com";
|
|
|
+ private String endpoint = "https://oss-cn-hangzhou.aliyuncs.com";
|
|
|
|
|
|
public void upload(String bucketName, String localFile, String objectName) {
|
|
|
OSS ossClient = new OSSClientBuilder().build(endpoint, accessId, accessKey);
|
|
@@ -42,8 +42,8 @@ public class OSSService implements Serializable {
|
|
|
|
|
|
public static void main(String[] args) {
|
|
|
|
|
|
- String bucketName = "art-test-video";
|
|
|
- String objectName = "test/model.tar.gz";
|
|
|
+ String bucketName = "art-recommend";
|
|
|
+ String objectName = "dyp/dssm.tar.gz";
|
|
|
OSSService ossService = new OSSService();
|
|
|
|
|
|
|
|
@@ -55,9 +55,9 @@ public class OSSService implements Serializable {
|
|
|
// ossService.upload(bucketName, outputPath, ossPath);
|
|
|
|
|
|
|
|
|
- String destPath = "/Users/dingyunpeng/Desktop/model2.tar.gz";
|
|
|
- ossService.download(bucketName, destPath, objectName);
|
|
|
- String destDir = "/Users/dingyunpeng/Desktop/model2";
|
|
|
+ String destPath = "/Users/dingyunpeng/Desktop/dssm.tar.gz";
|
|
|
+ //ossService.download(bucketName, destPath, objectName);
|
|
|
+ String destDir = ".";
|
|
|
CompressUtil.decompressGzFile(destPath, destDir);
|
|
|
|
|
|
}
|