add fileentity controller
Test Workflow / test (push) Successful in 4s

This commit is contained in:
vladp
2025-12-18 11:23:42 +07:00
parent f3aa6324c2
commit d167e92d90
@@ -26,11 +26,9 @@ import java.nio.file.Paths;
public class FileDownloadController { public class FileDownloadController {
private final FileEntityService fileEntityService; private final FileEntityService fileEntityService;
private final AuthTokenRepository authTokenRepository; private final AuthTokenRepository authTokenRepository;
/**
* Скачать файл по ID FileEntity
*/
@GetMapping("/download/{fileId}") @GetMapping("/download/{fileId}")
public ResponseEntity<Resource> downloadFile( public ResponseEntity<Resource> downloadFile(
@PathVariable String fileId, @PathVariable String fileId,
@@ -73,9 +71,6 @@ public class FileDownloadController {
} }
} }
/**
* Получить предпросмотр файла (если поддерживается)
*/
@GetMapping("/preview/{fileId}") @GetMapping("/preview/{fileId}")
public ResponseEntity<Resource> previewFile( public ResponseEntity<Resource> previewFile(
@PathVariable String fileId, @PathVariable String fileId,
@@ -117,9 +112,6 @@ public class FileDownloadController {
} }
} }
/**
* Получить информацию о файле для фронтенда
*/
@GetMapping("/info/{fileId}") @GetMapping("/info/{fileId}")
public ResponseEntity<FileEntityResponse> getFileInfo( public ResponseEntity<FileEntityResponse> getFileInfo(
@PathVariable String fileId, @PathVariable String fileId,