Will Spring hold contents in memory or stores in the disk?

前端 未结 4 1112
情话喂你
情话喂你 2021-02-07 20:43

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

4条回答
  •  无人及你
    2021-02-07 21:22

    A bit more digging in the javadoc shows that the default maximum in-memory size is 10240 bytes. From that I'd assume that any upload less than 10kB is held in memory, anything larger will be stored on disk. If you don't specify the disk location, it'll likely use a default (I'd guess it'll use the system default tmp directory).

提交回复
热议问题