dev delete config
Test Workflow / test (push) Waiting to run

This commit is contained in:
vladp
2026-02-17 12:55:25 +07:00
parent 27b0aaaf70
commit fba974f91b
@@ -9,6 +9,7 @@ import com.vrt.fileprotection.image.phash.PHash;
import com.vrt.fileprotection.image.phash.PerceptualHashHelper;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
@@ -160,6 +161,7 @@ public class FileSimilarityService {
}
}
@Autowired
private NoCopyFileService noCopyFileService;
public Page<SimilarFileDTO> findSimilarFiles(String fileId, SimilarityFilter filter, Pageable pageable,
@@ -220,7 +222,9 @@ public class FileSimilarityService {
for (FileEntity file : fileEntityList) {
try {
Path path = Paths.get(file.getFilePath());
FileProtector.Type fileType = FileProtector.Type.valueOf(file.getMimeType().toUpperCase());
FileProtector.Type fileType = file.getMimeType().equals("document") ? FileProtector.Type.DOC:
FileProtector.Type.AUDIO;
NoCopyCheckResult noCopyCheckResult = noCopyFileService.checkFile(path.toFile(), fileType);