set chunk-size to 1000000
Test Workflow / test (push) Successful in 2s

This commit is contained in:
vladp
2025-12-26 19:50:32 +07:00
parent 9541e89651
commit 86e7371ffe
3 changed files with 9 additions and 15 deletions
@@ -102,7 +102,7 @@ public class FileUploadServiceImpl implements FileUploadService {
int totalChunks = (int) Math.ceil((double) fileSize / chunkSize);
log.debug("File will be split into {} chunks (chunk size: {} bytes)",
totalChunks, chunkSize);
Long chunkSize = totalChunks == 1 ? fileSize : 5242880L;
Long chunkSize = totalChunks == 1 ? fileSize : 1000000L;
FileUploadSession session = FileUploadSession.builder()
.userId(userId)
+7 -13
View File
@@ -16,29 +16,22 @@ spring:
servlet:
multipart:
enabled: true
resolve-lazily: true #
file-size-threshold: 2KB #
max-file-size: 10MB
max-request-size: 100MB
enabled: true
resolve-lazily: false
file:
storage:
base-path: ${FILE_STORAGE_PATH:/data/uploads}
chunk-size: ${FILE_CHUNK_SIZE:5242880} # 5MB
# chunk-size: ${FILE_CHUNK_SIZE:5242880} # 5MB
chunk-size: ${FILE_CHUNK_SIZE:1000000} # 5MB
max-file-size: ${MAX_FILE_SIZE:10737418240} # 10GB
max-retry-attempts: ${MAX_RETRY_ATTEMPTS:3}
chunk-timeout-ms: ${CHUNK_TIMEOUT_MS:300000} # 5 минут
temp-ttl-hours: ${TEMP_TTL_HOURS:72} # 3 дня
session-expiry-hours: ${SESSION_EXPIRY_HOURS:24}
server:
port: ${SERVER_PORT:8080}
tomcat:
max-swallow-size: -1 #
connection-timeout: 300000 #
max-http-header-size: 16KB
security:
cors:
allowed-origins: "*"
@@ -46,12 +39,13 @@ security:
allowed-headers: "*"
allow-credentials: true
server:
port: ${SERVER_PORT:8080}
logging:
level:
com.example.fileupload: DEBUG
org.springframework.web: DEBUG
org.springframework.web.multipart: TRACE # ← ДЛЯ ОТЛАДКИ
org.apache.tomcat: DEBUG # ← ЛОГИ TOMCAT
org.hibernate.SQL: DEBUG
file:
name: logs/application.log