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:51:59 +07:00
parent de8c53784b
commit b0237fd812
@@ -6,6 +6,7 @@ import com.vrt.fileprotection.NoCopyCheckResult;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.io.FileSystemResource;
import org.springframework.core.io.Resource; import org.springframework.core.io.Resource;
import org.springframework.core.io.UrlResource; import org.springframework.core.io.UrlResource;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
@@ -338,8 +339,10 @@ public class ApiController {
} }
Path filePath = Paths.get(entityResponse.getProtectedFilePath()); Path filePath = Paths.get(entityResponse.getFilePath());
Resource resource = new UrlResource(filePath.toUri()); Resource resource = new FileSystemResource(filePath);
// Resource resource = new UrlResource(filePath.toUri());
if (!resource.exists()) { if (!resource.exists()) {
Map<String, Object> errorData = new HashMap<>(); Map<String, Object> errorData = new HashMap<>();