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
struct ErrorErrors that can occur when parsing Content-Disposition headers.
Initializers
init(from: HTTPFields.Value) throws(ContentDisposition.Error)Initializes a ContentDisposition by parsing a raw header field value.
Instance Properties
let additionalParameters: [String : String]Additional parameters included in the Content-Disposition header.let dispositionType: ContentDisposition.DispositionTypeThe type of content disposition, indicating how the content should be handled.let filename: String?The optional filename parameter of the Content-Disposition header.var name: String?The name parameter of the Content-Disposition header.
Enumerations
enum DispositionTypeThe 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.SendableSwift.SendableMetatype