dev comment all google search
Test Workflow / test (push) Successful in 5s

This commit is contained in:
vladp
2026-03-17 14:50:43 +07:00
parent e66225cdd1
commit 15d1824757
2 changed files with 6 additions and 0 deletions
@@ -2,6 +2,7 @@ package ru.soune.nocopy.service.file;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import ru.soune.nocopy.dto.file.FileEntityResponse;
@@ -50,6 +51,9 @@ public class FileEntityService {
private final ImageResizeService imageResizeService;
@Value("${server.baseurl}")
private String baseUrl;
@Transactional(noRollbackFor = DuplicateImageException.class)
public FileEntity createFromUploadSession(FileUploadSession session, String checksum) {
log.info("Creating FileEntity for upload session: {}", session.getUploadId());
@@ -417,6 +421,7 @@ public class FileEntityService {
.checksCount(0)
.fileUploadDate(fileEntity.getCreatedAt())
.protectedFilePath(fileEntity.getProtectedFilePath())
.thumbnailFileUrl(baseUrl + "/api/files/protected/" + fileEntity.getId() + "/thumbnail")
.build();
}