Transformable
public class Transformable : NSObject
Represents an Transformable
object.
See Image Transformations Overview for more information about image transformations.
-
An API key obtained from the Developer Portal.
Declaration
Swift
@objc public let apiKey: String
-
A Filestack Handle.
nil
by default.Declaration
Swift
@objc public var handle: String? { get }
-
An array of Filestack Handles.
nil
by deafult.Declaration
Swift
@objc public var handles: [String]? { get }
-
An external URL.
nil
by default.Declaration
Swift
@objc public var externalURL: URL? { get }
-
An array of external URLs.
nil
by default.Declaration
Swift
@objc public var externalURLs: [URL]? { get }
-
An URL corresponding to this image transform.
Declaration
Swift
@objc public var url: URL { get }
-
Stores a copy of the transformation results to your preferred filestore.
Declaration
Swift
@available(*, deprecated, message: "Marked for removal in version 3.0. Use the new store(using:base64Decode:queue:completionHandler﹚ instead") @discardableResult @objc public func store(fileName: String? = nil, location: StorageLocation, path: String? = nil, container: String? = nil, region: String? = nil, access: StorageAccess, base64Decode: Bool, queue: DispatchQueue? = .main, completionHandler: @escaping (FileLink?, JSONResponse) -> Void) -> Self
Parameters
fileName
Change or set the filename for the converted file.
location
An
StorageLocation
value.path
Where to store the file in your designated container. For S3, this is the key where the file will be stored at.
container
The name of the bucket or container to write files to.
region
S3 specific parameter. The name of the S3 region your bucket is located in. All regions except for
eu-central-1
(Frankfurt),ap-south-1
(Mumbai), andap-northeast-2
(Seoul) will work.access
An
StorageAccess
value.base64Decode
Specify that you want the data to be first decoded from base64 before being written to the file. For example, if you have base64 encoded image data, you can use this flag to first decode the data before writing the image file.
queue
The queue on which the completion handler is dispatched.
completionHandler
Adds a handler to be called once the request has finished.
-
Adds a new transformation to the transformation chain.
Declaration
Swift
@discardableResult func add(transform: Transform) -> Self
Parameters
transform
The
Transform
to add. -
Includes detailed information about the transformation request.
Declaration
Swift
@discardableResult @objc func debug() -> Self
-
Stores a copy of the transformation results to your preferred filestore.
Declaration
Swift
@discardableResult @objc func store(using options: StorageOptions, base64Decode: Bool = false, queue: DispatchQueue? = .main, completionHandler: @escaping (FileLink?, JSONResponse) -> Void) -> Self
Parameters
options
An
StorageOptions
value.base64Decode
Specify that you want the data to be first decoded from base64 before being written to the file. For example, if you have base64 encoded image data, you can use this flag to first decode the data before writing the image file.
queue
The queue on which the completion handler is dispatched.
completionHandler
Adds a handler to be called once the request has finished.