LocalFile
public class LocalFile
A data type represents a local file.
Since
1.4.0-
A data type represents the thumbnail of this local file. The thumbnail typically is an image file to provide preview of the local file without opening.
Since
1.4.0Declaration
Swift
public class Thumbnail
-
The path of the local file to be uploaded.
Declaration
Swift
public let path: String
-
The display name of the file.
Declaration
Swift
public let name: String
-
The MIME type of the file.
Declaration
Swift
public let mime: String
-
The size in bytes of the file.
Declaration
Swift
public let size: UInt64
-
The progress indicator callback for uploading progresses.
Declaration
Swift
public let progressHandler: ((Double) -> Void)?
-
The thumbnail for the local file. If not nil, the thumbnail will be uploaded with the local file.
Declaration
Swift
public let thumbnail: Thumbnail?
-
LocalFile constructor.
Since
1.4.0Declaration
Swift
public init?(path: String, name: String? = nil, mime: String? = nil, thumbnail: Thumbnail? = nil, progressHandler: ((Double) -> Void)? = nil)
Parameters
path
The path of the local file.
name
The name of the uploaded file.
mime
The MIME type of the local file.
thumbnail
The thumbnail for the local file.
progressHandler
the progress indicator callback for uploading progresses.