eugenp / tutorials

Getting Started with Spring Boot 3:
https://bit.ly/github-ls
MIT License
36.7k stars 54.47k forks source link

[ISSUE] Use servlet.multipart.enable and commons-fileupload2-jakarta #15280

Open tgkprog opened 12 months ago

tgkprog commented 12 months ago

Article and Module Links https://www.baeldung.com/spring-apache-file-upload https://github.com/eugenp/tutorials/tree/master/spring-web-modules/spring-rest-simple

Describe the Issue In newer spring boot the property to tell boot not to handle file uploads itself is servlet.multipart.enabled and not spring.http.multipart.enabled

Also be good to update the article with new apache file up that has jakarta imports instead of javax i.e.

org.apache.commons
        <artifactId>commons-fileupload2-jakarta</artifactId>

Also see https://stackoverflow.com/a/51924188/1643558

How about a manually run a html jaavscript integration test that uploads a text file of randomly created characters of 3GB with fixed first line and last line to allow for validation?

tgkprog commented 12 months ago

This could be a new example

ulisseslima commented 11 months ago

Hey, @tgkprog.

Thanks for the feedback. We'll look into this.

This issue will remain open until then.

tgkprog commented 11 months ago

This might help controller code handling multi part (line of code and the repo is a sample of streaming file upload in spring using apache commons file upload 2