RoutingEndpointConventionBuilderExtensions.WithFormOptions<TBuilder> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Configures Microsoft.AspNetCore.Http.Metadata.FormOptionsMetadata for all endpoints produced on the target IEndpointConventionBuilder.
public static TBuilder WithFormOptions<TBuilder> (this TBuilder builder, bool? bufferBody = default, int? memoryBufferThreshold = default, long? bufferBodyLengthLimit = default, int? valueCountLimit = default, int? keyLengthLimit = default, int? valueLengthLimit = default, int? multipartBoundaryLengthLimit = default, int? multipartHeadersCountLimit = default, int? multipartHeadersLengthLimit = default, long? multipartBodyLengthLimit = default) where TBuilder : Microsoft.AspNetCore.Builder.IEndpointConventionBuilder;
static member WithFormOptions : 'Builder * Nullable<bool> * Nullable<int> * Nullable<int64> * Nullable<int> * Nullable<int> * Nullable<int> * Nullable<int> * Nullable<int> * Nullable<int> * Nullable<int64> -> 'Builder (requires 'Builder :> Microsoft.AspNetCore.Builder.IEndpointConventionBuilder)
<Extension()>
Public Function WithFormOptions(Of TBuilder As IEndpointConventionBuilder) (builder As TBuilder, Optional bufferBody As Nullable(Of Boolean) = Nothing, Optional memoryBufferThreshold As Nullable(Of Integer) = Nothing, Optional bufferBodyLengthLimit As Nullable(Of Long) = Nothing, Optional valueCountLimit As Nullable(Of Integer) = Nothing, Optional keyLengthLimit As Nullable(Of Integer) = Nothing, Optional valueLengthLimit As Nullable(Of Integer) = Nothing, Optional multipartBoundaryLengthLimit As Nullable(Of Integer) = Nothing, Optional multipartHeadersCountLimit As Nullable(Of Integer) = Nothing, Optional multipartHeadersLengthLimit As Nullable(Of Integer) = Nothing, Optional multipartBodyLengthLimit As Nullable(Of Long) = Nothing) As TBuilder
Type Parameters
- TBuilder
Parameters
- builder
- TBuilder
Configures how many bytes of the body will be buffered in memory. Defaults to 65,536 bytes, which is approximately 64KB.
Limit for the total number of bytes that will be buffered. Defaults to 128MB.
Limit for the number of form entries to allow. Defaults to DefaultValueCountLimit.
Limit on the length of individual keys. Defaults to DefaultKeyLengthLimit.
Limit on the length of individual form values. Defaults to DefaultValueLengthLimit.
Limit for the length of the boundary identifier. Defaults to 128 bytes.
Limit for the number of headers to allow in each multipart section. Defaults to DefaultHeadersCountLimit.
Limit for the total length of the header keys and values in each multipart section. Defaults to DefaultHeadersLengthLimit.
Limit for the length of each multipart body. Defaults to 134,217,728 bytes, which is approximately 128MB.
Returns
The IEndpointConventionBuilder.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for