I'm using flux of FileParts to upload files @RequestPart(FILES) Flux<FilePart> files
And trying to limit maximum size of files. Looks like old way does not work:
spring.servlet.multipart.max-file-size=1MB
spring.servlet.multipart.max-request-size=1MB
And I dont have any methods to get file size in FilePart
interface. So is ther any way to limit max size of uploaded file in webflux, whithout copying it? I know that there are headers like Content-Length
, but it does not look secure way.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…