Class
Transformable
public class Transformable: NSObject
Represents an Transformable
object.
See Image Transformations Overview for more information about image transformations.
Relationships
Conforms To
NSObject
Properties
Methods
store(fileName:location:path:container:region:access:base64Decode:queue:completionHandler:)
@objc
@available(*, deprecated, message: "Marked for removal in version 3.0. Use the new store(using:base64Decode:queue:completionHandler) instead")
@discardableResult
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
Stores a copy of the transformation results to your preferred filestore.
Parameters
Name | Type | Description |
---|---|---|
fileName | String? |
Change or set the filename for the converted file. |
location | StorageLocation |
An |
path | String? |
Where to store the file in your designated container. For S3, this is the key where the file will be stored at. |
container | String? |
The name of the bucket or container to write files to. |
region | String? |
S3 specific parameter. The name of the S3 region your bucket is located in. All regions except for |
access | StorageAccess |
An |
base64Decode | Bool |
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 | DispatchQueue? |
The queue on which the completion handler is dispatched. |
completionHandler | @escaping (FileLink?, JSONResponse) -> Void |
Adds a handler to be called once the request has finished. |
add(transform:)
@discardableResult
func add(transform: Transform) -> Self
Adds a new transformation to the transformation chain.
Parameters
Name | Type | Description |
---|---|---|
transform | Transform |
The |
debug()
@objc
@discardableResult
func debug() -> Self
Includes detailed information about the transformation request.
store(using:base64Decode:queue:completionHandler:)
@objc
@discardableResult
func store(using options: StorageOptions,
base64Decode: Bool = false,
queue: DispatchQueue? = .main,
completionHandler: @escaping (FileLink?, JSONResponse) -> Void) -> Self
Stores a copy of the transformation results to your preferred filestore.
Parameters
Name | Type | Description |
---|---|---|
options | StorageOptions |
An |
base64Decode | Bool |
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 | DispatchQueue? |
The queue on which the completion handler is dispatched. |
completionHandler | @escaping (FileLink?, JSONResponse) -> Void |
Adds a handler to be called once the request has finished. |