When a file say 100 MB size is uploaded from browser will Spring hold whole data in memory or stores in the disk temporarily. After going through Spring doc I know how to set a
In spring boot, spring.servlet.multipart.file-size-threshold
specifies the size threshold after which files will be written to disk.
The default value of the property is zero. It means by default, it stores all files in a temporary location (can be configured via spring.servlet.multipart.location
).
Link: spring boot properties
Be aware of some bugs on the implementations here: https://github.com/spring-projects/spring-boot/issues/9073