@@ -401,14 +401,14 @@ public class ApiController {
|
||||
public ResponseEntity<?> check(@PathVariable(required = false) String fileId,
|
||||
@PathVariable(required = false) String type) {
|
||||
Optional<FileEntity> optionalFileEntity = fileEntityRepository.findById(fileId);
|
||||
|
||||
if (!optionalFileEntity.isPresent()) {
|
||||
return ResponseEntity.notFound().build();
|
||||
}
|
||||
|
||||
FileEntity fileEntity = optionalFileEntity.get();
|
||||
|
||||
Path path = type.toLowerCase().equals("image") ? Paths.get(fileEntity.getFilePath()) :
|
||||
Paths.get(fileEntity.getProtectedFilePath());
|
||||
Path path = Paths.get(fileEntity.getProtectedFilePath());
|
||||
|
||||
File file = path.toFile();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user