@@ -207,6 +207,17 @@ public class ApiController {
|
|||||||
|
|
||||||
private final NoCopyFileService noCopyFileService;
|
private final NoCopyFileService noCopyFileService;
|
||||||
|
|
||||||
|
@GetMapping("/check/{fileId}")
|
||||||
|
public ResponseEntity<BaseResponse> check(@PathVariable String fileId) {
|
||||||
|
FileEntity fileEntity = fileEntityRepository.findByFileId(fileId);
|
||||||
|
|
||||||
|
File file = new File(fileEntity.getFilePath());
|
||||||
|
NoCopyCheckResult checkResult = noCopyFileService.checkFile(file, FileProtector.Type.IMAGE);
|
||||||
|
log.info("checkResult: {}", checkResult);
|
||||||
|
|
||||||
|
return ResponseEntity.ok(new BaseResponse(1, 1, "1", checkResult));
|
||||||
|
}
|
||||||
|
|
||||||
@GetMapping("/v{version}/files/{fileId}/similar")
|
@GetMapping("/v{version}/files/{fileId}/similar")
|
||||||
public ResponseEntity<BaseResponse> findSimilarFiles(
|
public ResponseEntity<BaseResponse> findSimilarFiles(
|
||||||
@PathVariable("version") int version,
|
@PathVariable("version") int version,
|
||||||
|
|||||||
Reference in New Issue
Block a user