학습데이터 목록 파일 단위 MB 나오게 하기

This commit is contained in:
2026-02-13 09:42:36 +09:00
parent ce6e4f5aea
commit 26a4623aa8

View File

@@ -77,9 +77,16 @@ public class DatasetDto {
}
public String getTotalSize(Long totalSize) {
if (totalSize == null) return "0G";
if (totalSize == null || totalSize <= 0) return "0M";
double giga = totalSize / (1024.0 * 1024 * 1024);
return String.format("%.2fG", giga);
if (giga >= 1) {
return String.format("%.2fG", giga);
} else {
double mega = totalSize / (1024.0 * 1024);
return String.format("%.2fM", mega);
}
}
public String getStatus(String status) {