This commit is contained in:
77
2024-06-01 22:15:13 +08:00
parent 3b7afaf571
commit 687f2e574e
2 changed files with 2 additions and 4 deletions

View File

@@ -18,8 +18,6 @@ public class CaiFileUtils {
private String suffix;
}
private static String BASE_URL = "https://nono-1257812345.cos.ap-shanghai.myqcloud.com/";
public static FileSize getFastFileSize(String url){
return new FileSize();
}
@@ -29,7 +27,7 @@ public class CaiFileUtils {
String suffix = StringUtils.substring(url, url.lastIndexOf("."), url.length());
fileSize.setSuffix(suffix);
try {
URL imageUrl = new URL(BASE_URL+url); // 替换为实际的图片 URL
URL imageUrl = new URL(url); // 替换为实际的图片 URL
BufferedImage image = ImageIO.read(imageUrl);
int width = image.getWidth();
int height = image.getHeight();