dev fix thumbnal path
Test Workflow / test (push) Has been cancelled

This commit is contained in:
2026-04-21 03:11:52 +07:00
parent 5fc9563a4e
commit 1b2337ea2f
@@ -109,7 +109,9 @@ public class FileController {
FileEntity fileEntity = fileRepository.findById(fileId)
.orElseThrow(() -> new RuntimeException("File not found"));
File file = cloudStorageService.readFileFromStorageByPath(fileEntity.getFilePath());
String filePath = type.equals("thumbnail") ? fileEntity.getThumbnailPath(): fileEntity.getFilePath();
File file = cloudStorageService.readFileFromStorageByPath(filePath);
if (file == null || !file.exists()) {
log.error("File not found in storage: {}", fileEntity.getFilePath());