add bone for file system #9
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user