UploadableFileInfo

@objc(SBDUploadableFileInfo)
public final class UploadableFileInfo : NSObject, Codable

An object that contains a set of options to create a single file inside the files in a MultipleFilesMessage instance.

Since

4.9.1
  • File URL. file and fileURL cannot be set together.

    Declaration

    Swift

    @objc
    public let fileURL: String?
  • Binary file data. file and fileURL cannot be set together.

    Declaration

    Swift

    @objc
    public var file: Data?
  • File size.

    Declaration

    Swift

    @objc
    public var fileSize: UInt { get set }
  • Thumbnail sizes. This parameter is an array of ThumbnailSize instance and works for image file only.

    Declaration

    Swift

    @objc
    public var thumbnailSizes: [ThumbnailSize]?
  • File name.

    Declaration

    Swift

    @objc
    public var fileName: String? { get set }
  • File MIME type.

    Declaration

    Swift

    @objc
    public var mimeType: String? { get set }
  • Initializes an instace of UploadableFileInfo with binary file data.

    Declaration

    Swift

    @objc
    public init(file: Data)

    Parameters

    file

    A binary file to be sent. The size of the file should be no bigger than the app’s file upload size limit.

    Return Value

    An initialized UploadableFileInfo

  • Initializes an instace of UploadableFileInfo with a file URL.

    Declaration

    Swift

    @objc
    public init(fileURL: String)

    Parameters

    fileURL

    A file URL to be sent

    Return Value

    An initialized UploadableFileInfo

Codable

  • Encodes this object.

    Declaration

    Swift

    public func encode(to encoder: Encoder) throws

    Parameters

    encoder

    Encoder instance

  • Default constructor.

    Declaration

    Swift

    public required init(from decoder: Decoder) throws

    Parameters

    decoder

    Decoder instance