UploadableFileInfo
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
andfileURL
cannot be set together.Declaration
Swift
public let fileURL: String?
-
Binary file data.
file
andfileURL
cannot be set together.Declaration
Swift
public var file: Data?
-
File size.
Declaration
Swift
public var fileSize: UInt
-
Thumbnail sizes. This parameter is an array of
ThumbnailSize
instance and works for image file only.Declaration
Swift
public var thumbnailSizes: [ThumbnailSize]?
-
File name.
Declaration
Swift
public var fileName: String?
-
File MIME type.
Declaration
Swift
public var mimeType: String?
-
Initializes an instace of UploadableFileInfo with binary file data.
Declaration
Swift
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
public init(fileURL: String)
Parameters
fileURL
A file URL to be sent
Return Value
An initialized UploadableFileInfo
-
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