Attachment

public struct Attachment : Equatable, Sendable

Represents info about an uploaded attachment.

  • url

    The URL where the attachment can be found.

    Declaration

    Swift

    public let url: String
  • A friendly name to display to the user.

    Declaration

    Swift

    public let friendlyName: String
  • The MIME type relevant to the attachment type.

    Declaration

    Swift

    public let mimeType: String
  • The name of the attachment file.

    Declaration

    Swift

    public let fileName: String

Init

  • Creates an Attachment value.

    Declaration

    Swift

    public init(url: String, friendlyName: String, mimeType: String, fileName: String)

    Parameters

    url

    The remote URL the file is hosted at.

    friendlyName

    A human-readable name suitable for display in the UI.

    mimeType

    The MIME type (e.g. image/png).

    fileName

    The original on-disk filename.