File

public struct File

Represents a file retrieved from library

  • The identifier of the file

    Declaration

    Swift

    public let identifier: String
  • The file’s metadata

    Declaration

    Swift

    public let metadata: FileMetadata
  • The file’s raw data

    Declaration

    Swift

    public let data: Data
  • The file’s MIME type

    Declaration

    Swift

    public var mimeType: MimeType { get }
  • Convenience function to return data as JSON object, if possible

    Declaration

    Swift

    public func toJSON() -> Any?

    Return Value

    JSON object or nil if deserialization unsuccesful

  • Convenience function to return data as UIImage, if possible

    Declaration

    Swift

    public func toImage() -> UIImage?

    Return Value

    UIImage or nil if mime type is not an image type