This commit is contained in:
@@ -56,7 +56,7 @@ public class FileEntityService {
|
||||
|
||||
Map<String, Long> imageHash = Map.of();
|
||||
|
||||
if (!session.getFileType().startsWith("video")) {
|
||||
if (session.getFileType().startsWith("image")) {
|
||||
imageHash = imageHashService.calculateHash(filePath);
|
||||
List<SimilarImageProjection> duplicatedByHash = fileSimilarityService.findDuplicatedByHash(
|
||||
imageHash.get("hi"), imageHash.get("low"));
|
||||
|
||||
@@ -240,7 +240,7 @@ public class FileUploadServiceImpl implements FileUploadService {
|
||||
|
||||
FileEntity saved = fileEntityRepository.save(fileEntity);
|
||||
|
||||
if (!session.getFileType().equals("video")) {
|
||||
if (session.getFileType().equals("image")) {
|
||||
Map<String, Long> hash = imageHashService.calculateHash(filePath);
|
||||
|
||||
imageHashService.create(saved, hash);
|
||||
|
||||
Reference in New Issue
Block a user