dev add monitoring basic
Test Workflow / test (push) Successful in 4s

This commit is contained in:
vladp
2026-03-02 15:52:17 +07:00
parent 2966d9f3a9
commit 597b46ccff
@@ -374,12 +374,18 @@ public class FileEntityService {
private FileEntityResponse convertToResponse(FileEntity fileEntity, int version) {
boolean existsOnDisk = checkFileExistsOnDisk(fileEntity.getFilePath());
User user = userRepository.findById(fileEntity.getUserId()).get();
String[] splitName = fileEntity.getOriginalFileName().split(".");
String fileName = fileEntity.getOriginalFileName();
String name = fileName;
int lastDotIndex = fileName.lastIndexOf(".");
if (lastDotIndex > 0) {
name = fileName.substring(0, lastDotIndex);
}
return FileEntityResponse.builder()
.id(fileEntity.getId())
.userId(fileEntity.getUserId())
.originalFileName(splitName[0] + "_nocopy_protected" + "." + fileEntity.getFileExtension())
.originalFileName(name + "_nocopy_protected" + "." + fileEntity.getFileExtension())
.storedFileName(fileEntity.getStoredFileName())
.filePath(fileEntity.getProtectedFilePath())
.fileSize(fileEntity.getFileSize())
@@ -395,7 +401,7 @@ public class FileEntityService {
.existsOnDisk(existsOnDisk)
.supportId(fileEntity.getSupportId())
.protectStatus(fileEntity.getProtectionStatus().toString())
.fileName(splitName[0] + "_nocopy_protected" + "." + fileEntity.getFileExtension())
.fileName(name + "_nocopy_protected" + "." + fileEntity.getFileExtension())
.ownerName(user.getFullName())
.ownerEmail(user.getEmail())
.ownerCompany(user.getCompanyName())