Skip to content

Structure

ContentDisposition

Represents a parsed Content-Disposition header field for multipart messages.
struct ContentDisposition

Overview

The Content-Disposition header is defined in RFC 6266 (HTTP) and RFC 7578 (multipart/form-data) and provides metadata about each part, including:

  • The disposition type (form-data, attachment, inline)

  • The “name” parameter that identifies the form field (required for form-data)

  • An optional “filename” parameter for file uploads

  • Any additional custom parameters

Topics

Structures

Initializers

  • init(from:)
    Initializes a ContentDisposition by parsing a raw header field value.

Instance Properties

  • additionalParameters
    Additional parameters included in the Content-Disposition header.
  • dispositionType
    The type of content disposition, indicating how the content should be handled.
  • filename
    The optional filename parameter of the Content-Disposition header.
  • name
    The name parameter of the Content-Disposition header.

Enumerations

  • ContentDisposition.DispositionType
    The type of content disposition as defined in HTTP standards. Each disposition type indicates a different way the content should be handled.

Relationships

Conforms To

  • Swift.Sendable
  • Swift.SendableMetatype