@@ -164,13 +164,8 @@ public class ImageFoundRequestHandler implements RequestHandler {
|
||||
try {
|
||||
tempFile = convertToSupportedFormat(fileUploadService.downloadImageFromUrl(url));
|
||||
File file = tempFile.toFile();
|
||||
// String filePath = tempFile.toAbsolutePath().toString();
|
||||
NoCopyCheckResult checkResult = noCopyFileService.checkFile(file, FileProtector.Type.IMAGE);
|
||||
// Map<String, Long> hashSearchApiFile = imageHashService.calculateHash(Paths.get(filePath));
|
||||
// ImageHashEntity checkFileHash = imageHashRepository.findByFileId(fileId);
|
||||
|
||||
// boolean hashesAreEqual = hashSearchApiFile.get("hi").equals(checkFileHash.getHash64Hi())
|
||||
// && hashSearchApiFile.get("low").equals(checkFileHash.getHash64Lo());
|
||||
if (checkResult instanceof ImageCheckResult.Success success) {
|
||||
double watermarkCorrelation = success.getWatermarkCorrelation();
|
||||
log.info("watermarkCorrelation: " + watermarkCorrelation);
|
||||
|
||||
Reference in New Issue
Block a user