@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user