chengf
2025-07-04 a26c074129afced8fe87e300fb501030fde0c056
java110-core/src/main/java/com/java110/core/client/CosUploadTemplate.java
@@ -139,11 +139,7 @@
        ByteArrayInputStream fis = null;
        try {
            ossClient = COSUtil.getCOSClient();
            ins = COSUtil.getInputStreamByCOS(ossClient, remotePath + fileName);
            if (ins == null) {
                // 处理流为null的异常情况(如抛自定义异常、打日志等)
                throw new RuntimeException("Failed to get input stream from COS");
            }
            COSUtil.getInputStreamByCOS(ossClient, remotePath + fileName);
            byteOut = new ByteArrayOutputStream();
            byte[] buf = new byte[2048];
            int bufsize = 0;