dev test baseurl for test
Test Workflow / test (push) Has been cancelled

This commit is contained in:
2026-04-22 02:06:39 +07:00
parent d92a9a7d86
commit cc43b92f69
3 changed files with 10 additions and 175 deletions
@@ -243,13 +243,11 @@ public class FileEntityService {
if (Files.exists(protectedFilePath)) {
Files.delete(protectedFilePath);
}
// SEND ON DISK
try (FileChannel channel = FileChannel.open(protectedFilePath, StandardOpenOption.WRITE)) {
channel.force(true);
}
// Files.write(protectedFilePath, data);
if (imageResizeService.isImage(extension)) {
imageResizeService.generateSizes(fileEntity, data);
}
@@ -304,7 +302,7 @@ public class FileEntityService {
return protectedPath;
}
public void updateSignature(String signature, String fileId) throws IOException {
public FileEntity updateSignature(String signature, String fileId) throws IOException {
FileEntity fileEntity = fileEntityRepository.findByFileId(fileId);
fileEntity.setSignature(signature);
fileEntity.setProtectionStatus(ProtectionStatus.PROTECTED);
@@ -312,7 +310,7 @@ public class FileEntityService {
fileEntity.setProtectedAt(LocalDateTime.now());
fileEntity.setProtectedFilePath(prepareProtectedPath(fileEntity, fileEntity.getFileExtension()).toString());
fileEntityRepository.save(fileEntity);
return fileEntityRepository.save(fileEntity);
}
public String formatFileSize(long size) {