If I accept a file from a MultipartRequest and call
File f = request.getFile("fileName");
Is the file written to disk (as a temp file) or is it only stored in memory at this point?
If I accept a file from a MultipartRequest and call
File f = request.getFile("fileName");
Is the file written to disk (as a temp file) or is it only stored in memory at this point?
This is implementation dependent. You have no need to know, short of wanting to short-circuit an operation like "move." But even the File object returned could be an implementation-dependent interface that supports move semantics from memory to disk.
Assuming you're talking about the o'Reilly MultipartRequest it'll always be written to disk according to the link.
Update
If you're talking about the Spring commons FileUpload component, it does support this setup. One of the properties you can set is setMaxInMemorySize(int bytes)
which determines the max size of a file that will be held in memory and not written to disk.