mimeConfig = createMimeConfig(properties);
}
private MIMEConfig createMimeConfig(final MultiPartProperties properties) {
final MIMEConfig mimeConfig = new MIMEConfig();
// Set values defined by user.
mimeConfig.setMemoryThreshold(properties.getBufferThreshold());
final String tempDir = properties.getTempDir();
if (tempDir != null) {
mimeConfig.setDir(tempDir);
}
if (properties.getBufferThreshold() != MultiPartProperties.BUFFER_THRESHOLD_MEMORY_ONLY) {
// Validate - this checks whether it's possible to create temp files in currently set temp directory.
try {