Class BodyConfig
- java.lang.Object
-
- io.quarkus.vertx.http.runtime.BodyConfig
-
public class BodyConfig extends Object
Request body related settings
-
-
Field Summary
Fields Modifier and Type Field Description booleandeleteUploadedFilesOnEndWhether the uploaded files should be removed after serving the request.booleanhandleFileUploadsWhether the files sent usingmultipart/form-datawill be stored locally.booleanmergeFormAttributesWhether the form attributes should be added to the request parameters.booleanpreallocateBodyBufferWhether the body buffer should pre-allocated based on theContent-Lengthheader value.StringuploadsDirectoryThe directory where the files sent usingmultipart/form-datashould be stored.
-
Constructor Summary
Constructors Constructor Description BodyConfig()
-
-
-
Field Detail
-
handleFileUploads
@ConfigItem(defaultValue="true") public boolean handleFileUploads
Whether the files sent usingmultipart/form-datawill be stored locally.If
true, they will be stored inquarkus.http.body-handler.uploads-directoryand will be made available viaio.vertx.ext.web.RoutingContext.fileUploads(). Otherwise, the the files sent usingmultipart/form-datawill not be stored locally, andio.vertx.ext.web.RoutingContext.fileUploads()will always return an empty collection. Note that even with this option being set tofalse, themultipart/form-datarequests will be accepted.
-
uploadsDirectory
@ConfigItem(defaultValue="${java.io.tmpdir}/uploads") public String uploadsDirectory
The directory where the files sent usingmultipart/form-datashould be stored.Either an absolute path or a path relative to the current directory of the application process.
-
mergeFormAttributes
@ConfigItem(defaultValue="true") public boolean mergeFormAttributes
Whether the form attributes should be added to the request parameters.If
true, the form attributes will be added to the request parameters; otherwise the form parameters will not be added to the request parameters
-
deleteUploadedFilesOnEnd
@ConfigItem(defaultValue="true") public boolean deleteUploadedFilesOnEnd
Whether the uploaded files should be removed after serving the request.If
truethe uploaded files stored inquarkus.http.body-handler.uploads-directorywill be removed after handling the request. Otherwise the files will be left there forever.
-
preallocateBodyBuffer
@ConfigItem public boolean preallocateBodyBuffer
Whether the body buffer should pre-allocated based on theContent-Lengthheader value.If
truethe body buffer is pre-allocated according to the size read from theContent-Lengthheader. Otherwise the body buffer is pre-allocated to 1KB, and is resized dynamically
-
-