chenjiahe
2022-07-27 386c2a4bfe398298db827607a32c1aa81cf7d554
统计业务
1个文件已修改
5 ■■■■■ 已修改文件
src/main/java/com/hx/util/COSUtil.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/hx/util/COSUtil.java
@@ -129,16 +129,11 @@
        File downloadFile = null;
        try {
            GetObjectRequest getObjectRequest;
            System.out.println("key:"+key);
            System.out.println("bucketName:"+bucketName);
            System.out.println("regionName:"+regionName);
            System.out.println("regionName:"+regionName+".myqcloud.com");
            //截取文件名称
            String[] datas = key.split(regionName+".myqcloud.com/");
            if(datas.length ==1){
                getObjectRequest = new GetObjectRequest(bucketName, datas[0]);
            }else if(datas.length ==2){
                System.out.println("datas[1]:"+datas[1]);
                getObjectRequest = new GetObjectRequest(bucketName, datas[1]);
            }else{
                throw new TipsException("文件路径错误【key】");