java.lang.Object
io.fusionauth.http.io.MultipartConfiguration
Provides configuration to control the behavior of the
MultipartStream parser, specifically around file uploads.- Author:
- Daniel DeGroff
-
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanlonglongintinthashCode()booleanwithDeleteTemporaryFiles(boolean deleteTemporaryFiles) Setting this totruewill cause the server to delete all temporary files created while processing a multipart stream after the request handler has been invoked.withFileUploadPolicy(MultipartFileUploadPolicy fileUploadPolicy) This is the file upload policy for the HTTP server.withMaxFileSize(long maxFileSize) This is the maximum size for each file found within a multipart stream which may contain one to many files.withMaxRequestSize(long maxRequestSize) This is the maximum size of the request payload in bytes when reading a multipart stream.withMultipartBufferSize(int multipartBufferSize) withTemporaryFileLocation(String temporaryFileLocation) A temporary file location used for creating temporary files.withTemporaryFilenamePrefix(String temporaryFilenamePrefix) An optional filename prefix used for naming temporary files.withTemporaryFilenameSuffix(String temporaryFilenameSuffix) An optional filename suffix used for naming temporary files.
-
Constructor Details
-
MultipartConfiguration
public MultipartConfiguration() -
MultipartConfiguration
-
-
Method Details
-
deleteTemporaryFiles
public boolean deleteTemporaryFiles() -
equals
-
getFileUploadPolicy
-
getMaxFileSize
public long getMaxFileSize() -
getMaxRequestSize
public long getMaxRequestSize() -
getMultipartBufferSize
public int getMultipartBufferSize() -
getTemporaryFileLocation
-
getTemporaryFilenamePrefix
-
getTemporaryFilenameSuffix
-
hashCode
public int hashCode() -
isDeleteTemporaryFiles
public boolean isDeleteTemporaryFiles() -
withDeleteTemporaryFiles
Setting this totruewill cause the server to delete all temporary files created while processing a multipart stream after the request handler has been invoked.If you set this to
falsethe request handler will need to manage cleanup of these temporary files.- Parameters:
deleteTemporaryFiles- controls if temporary files are deleted by the server.- Returns:
- This.
-
withFileUploadPolicy
This is the file upload policy for the HTTP server.- Parameters:
fileUploadPolicy- the file upload policy. Cannot be null.- Returns:
- This.
-
withMaxFileSize
This is the maximum size for each file found within a multipart stream which may contain one to many files.- Parameters:
maxFileSize- the maximum file size in bytes- Returns:
- This.
-
withMaxRequestSize
This is the maximum size of the request payload in bytes when reading a multipart stream.- Parameters:
maxRequestSize- the maximum request size in bytes- Returns:
- This.
-
withMultipartBufferSize
- Parameters:
multipartBufferSize- the size of the buffer used to parse a multipart stream.- Returns:
- This.
-
withTemporaryFileLocation
A temporary file location used for creating temporary files.The specific behavior of creating temporary files will be dependant upon the
MultipartFileManagerimplementation.- Parameters:
temporaryFileLocation- the temporary file location. Cannot benull.- Returns:
- This.
-
withTemporaryFilenamePrefix
An optional filename prefix used for naming temporary files.This parameter may be set to
null. When set tonulla system default such as '.tmp' may be used when naming a temporary file depending upon theMultipartFileManagerimplementation.- Parameters:
temporaryFilenamePrefix- an optional filename prefix to be used when creating temporary files.- Returns:
- This.
-
withTemporaryFilenameSuffix
An optional filename suffix used for naming temporary files.This parameter may be set to
null. The specific file naming with or without this optional suffix may be dependant upon theMultipartFileManagerimplementation. file depending upon theMultipartFileManagerimplementation.- Parameters:
temporaryFilenameSuffix- an optional filename suffix to be used when creating temporary files.- Returns:
- This.
-