dev add tariff and temp flag for files
Test Workflow / test (push) Successful in 2s

This commit is contained in:
vladp
2026-01-30 17:39:19 +07:00
parent 3cd6b5396c
commit de8c53784b
3 changed files with 4 additions and 6 deletions
@@ -286,9 +286,6 @@ public class ApiController {
} }
} }
@Value("${file.storage.base-path}")
private String baseStoragePath;
@GetMapping("/v{version}/files/download/{fileId}") @GetMapping("/v{version}/files/download/{fileId}")
public ResponseEntity<?> downloadFile( public ResponseEntity<?> downloadFile(
@PathVariable(required = false) String fileId, @PathVariable(required = false) String fileId,
@@ -340,9 +337,8 @@ public class ApiController {
errorData)); errorData));
} }
// String fullPath = baseStoragePath + "/" + entityResponse.getProtectStatus();
// Path filePath = Paths.get(entityResponse.getProtectStatus()); Path filePath = Paths.get(entityResponse.getProtectedFilePath());
Path filePath = Paths.get(entityResponse.getProtectStatus());
Resource resource = new UrlResource(filePath.toUri()); Resource resource = new UrlResource(filePath.toUri());
if (!resource.exists()) { if (!resource.exists()) {
@@ -19,6 +19,7 @@ public class FileEntityResponse {
private String originalFileName; private String originalFileName;
private String storedFileName; private String storedFileName;
private String filePath; private String filePath;
private String protectedFilePath;
private Long fileSize; private Long fileSize;
private String mimeType; private String mimeType;
private String fileExtension; private String fileExtension;
@@ -383,6 +383,7 @@ public class FileEntityService {
//TODO fix after add logic for check for protect file //TODO fix after add logic for check for protect file
.checksCount(0) .checksCount(0)
.fileUploadDate(fileEntity.getCreatedAt()) .fileUploadDate(fileEntity.getCreatedAt())
.protectedFilePath(fileEntity.getProtectedFilePath())
.build(); .build();
} }