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
If you don't set the temp directory CommonsMultipartResolver will save temporary files to the servlet container's temporary directory.
The "file" object in your example doesn't hold the data it similar to a java.io.File reference. You need to get the data with file.getBytes().
file.getBytes()