Path: redb-route/redb.Route.DataFormats.Mime/MimeMultipartDataFormatOptions.cs
Snapshot: redb-route, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb-route
Page: https://redbase.app/src/dev-2026-12-06/redb-route/redb.Route.DataFormats.Mime/MimeMultipartDataFormatOptions.cs
----
using System.Text;
namespace redb.Route.DataFormats.Mime;
///
/// Options of . The limits hold wherever the body comes from (HTTP, a file, a queue),
/// not only behind a web server.
///
public sealed class MimeMultipartDataFormatOptions
{
///
/// The subtype Marshal writes and the format registers under: form-data (the default: a
/// FormBody body and file attachments) or mixed (the body as the first part, as Camel's
/// mimeMultipart). Unmarshal reads multipart/form-data as a form and any other
/// multipart/* the Camel way, whatever this says.
///
public string SubType { get; set; } = "form-data";
///
/// Marshal with the mixed subtype writes a multipart even when the message has no attachments (Camel's
/// multipartWithoutAttachment); otherwise such a body is left as it is. Default false.
///
public bool MultipartWithoutAttachment { get; set; }
/// Most parts one body may have. Default 1000.
public int MaxParts { get; set; } = 1000;
/// Largest decoded part, in bytes. Default 10 MB.
public long MaxPartBytes { get; set; } = 10L * 1024 * 1024;
/// Largest body, in bytes as it arrives. Default 32 MB.
public long MaxTotalBytes { get; set; } = 32L * 1024 * 1024;
/// Longest file name of a part, in characters. Default 255.
public int MaxFileNameLength { get; set; } = 255;
///
/// Encoding of form fields and headers that declare none. Default UTF-8, what browsers send from a UTF-8 page and
/// what RFC 7578 recommends.
///
public Encoding DefaultCharset { get; set; } = Encoding.UTF8;
}