on-internet
← Community

Spring WebFlux: set max file(s) size for uploading files

Stack Overflow ·

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.

Comments

Sign in or sign up to comment and upvote.

No comments yet.