I am using spring boot for uploading files. The files sizes are usually about 2GB and we cannot use the default spring boot StandardServletMultipartResolver or
It's actually possible to conditionally disable multipary with a custom MultipartResolver, but you should do it at request level.
With multipart enabled, the files are stored locally on the server, and with multipart off, your controller has to do the parsing manually.
Since I read so much conflicting information on this topic, I decided to go into the details here https://youtu.be/OpJ0jKRBa1g where I illustrate how to have both strategies coexist at the same time.