FileMessage

@objc(SBDFileMessage)
open class FileMessage : BaseMessage

Represents a mesage object that contains a file. Derived from BaseMessage

Note

This class doesn’t include a binary data for the file. It is just a URL.
  • url

    The file URL.

    Declaration

    Swift

    @objc
    open var url: String { get }
  • The file URL without the ekey.

    Since

    3.0.194

    Declaration

    Swift

    @objc
    public let plainURL: String?
  • The name of file.

    Declaration

    Swift

    @objc
    public let name: String
  • The size of file.

    Declaration

    Swift

    @objc
    public let size: UInt
  • The type of file.

    Declaration

    Swift

    @objc
    public let type: String
  • Image thumbnails.

    Declaration

    Swift

    @objc
    open internal(set) var thumbnails: [Thumbnail]? { get }
  • Default constructor.

    Declaration

    Swift

    public required init(from decoder: Decoder) throws

    Parameters

    decoder

    Decoder instance

  • Encodes this object.

    Declaration

    Swift

    open override func encode(to encoder: Encoder) throws

    Parameters

    encoder

    Encoder instance

  • Undocumented

    Declaration

    Swift

    @objc
    open func getFileMessageParams() -> FileMessageCreateParams?
  • Disposes of the binary data in the file cache directory. The file message’s pending or failed message could have binary data in the messageParams property. The binary data could be used for the message preview or resending a failed message, so the binary data is stored in the file cache directory temporally. The binary data will be removed later automatically. If the binary data is needed to be removed when the pending or the failed file message is not used any more, this method could be called.

    Since

    4.0.14

    Declaration

    Swift

    @objc
    open func dispose()
  • Compares this object with given other object.

    Declaration

    Swift

    public override func isEqual(_ object: Any?) -> Bool

    Parameters

    object

    Any instance

    Return Value

    true if same otherwise false

  • Copies this object

    Declaration

    Swift

    open override func copy(with zone: NSZone? = nil) -> Any

    Parameters

    zone

    optional NSZone

    Return Value

    FileMessage instance