dev delete check file on disk
Test Workflow / test (push) Has been cancelled

This commit is contained in:
2026-04-21 01:52:48 +07:00
parent 61dcada973
commit 631066b217
@@ -7,6 +7,7 @@ import com.vrt.fileprotection.audio.AudioCheckResult;
import com.vrt.fileprotection.documents.DocumentCheckResult;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.core.io.FileSystemResource;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.web.PageableDefault;
@@ -520,7 +521,7 @@ public class ApiController {
.contentLength(file.length())
.header(HttpHeaders.CONTENT_DISPOSITION,
"attachment; filename=\"" + entityResponse.getFileName() + "\"")
.body(file);
.body(new FileSystemResource(file));
} catch (FileEntityNotFoundException e) {
Map<String, Object> errorData = new HashMap<>();
errorData.put("fileId", fileId);