dev test baseurl for test
Test Workflow / test (push) Has been cancelled

This commit is contained in:
2026-04-21 19:09:27 +07:00
parent dfc9a22bc5
commit 6c3742913c
5 changed files with 110 additions and 27 deletions
@@ -124,12 +124,12 @@ public class FileController {
String filePath = type.equals("thumbnail") ? fileEntity.getThumbnailPath(): fileEntity.getFilePath();
File file = cloudStorageService.readFileFromStorageByPath(filePath);
// InputStream file = cloudStorageService.readFileFromStorage(filePath);
if (file == null || !file.exists()) {
log.error("File not found in storage: {}", fileEntity.getFilePath());
return ResponseEntity.notFound().build();
}
// if (file == null || !file.exists()) {
// log.error("File not found in storage: {}", fileEntity.getFilePath());
// return ResponseEntity.notFound().build();
// }
if (fileEntity.getProtectionStatus() == ProtectionStatus.NOT_PROTECTED ||
fileEntity.getProtectionStatus() == ProtectionStatus.PROCESSING) {
@@ -142,7 +142,7 @@ public class FileController {
String encodedFileName = URLEncoder.encode(fileName, StandardCharsets.UTF_8)
.replace("+", "%20");
InputStreamResource resource = new InputStreamResource(new FileInputStream(file));
InputStreamResource resource = new InputStreamResource(cloudStorageService.readFileFromStorage(filePath));
return ResponseEntity.ok()
.contentType(new MediaType(fileEntity.getMimeType(), fileEntity.getFileExtension()))