diff --git a/src/main/java/classfit/example/classfit/common/util/DriveUtil.java b/src/main/java/classfit/example/classfit/common/util/DriveUtil.java index e3ea9390..f3b95cdd 100644 --- a/src/main/java/classfit/example/classfit/common/util/DriveUtil.java +++ b/src/main/java/classfit/example/classfit/common/util/DriveUtil.java @@ -129,13 +129,6 @@ private static String formatFileSize(long sizeInBytes) { } private static String getFileNameWithoutPrefix(String objectKey) { - String fileNameWithoutPrefix = objectKey.replaceFirst("^personal/\\d+/|^shared/\\d+/", ""); - - int lastSlashIndex = fileNameWithoutPrefix.lastIndexOf("/"); - if (lastSlashIndex != -1) { - fileNameWithoutPrefix = fileNameWithoutPrefix.substring(lastSlashIndex + 1); - } - - return fileNameWithoutPrefix.trim(); + return objectKey.replaceFirst("^personal/\\d+/|^shared/\\d+/", ""); } }