Filestack Documentation

Class Config

@objc(FSConfig) public class Config: NSObject  

The Config class is used together with Client to configure certain aspects of the API.

Config Config NSObject NSObject Config->NSObject

Nested Types

Config.Builder

A convenience class that allows easily building a new Config object.

Conforms To

NSObject

Properties

builder

@objc public static var builder  

Returns a Builder instance to help instantiating Config objects.

show​Editor​Before​Upload

@objc public var showEditorBeforeUpload: Bool = false

Change this flag to true if you want to allow user to edit photos before the upload.

callback​URLScheme

@objc public var callbackURLScheme: String? 

An URL scheme supported by the app. This is required to complete the cloud provider's authentication flow.

cloud​Thumbnail​Cache​Policy

@objc public var cloudThumbnailCachePolicy: URLRequest.CachePolicy = .reloadIgnoringLocalCacheData

This policy controls the thumbnail's caching behavior when browsing cloud contents in the picker.

kMaximum​Selection​NoLimit

@objc public static let kMaximumSelectionNoLimit: UInt = 0

Use this value if you want to allow user for selecting unlimited number of assets to upload.

maximum​Selection​Allowed

@objc public var maximumSelectionAllowed: UInt = 1

This controls if user can select more than one image/document for upload. Set this value to kMaximumSelectionNoLimit if you want to remove this limit. Setting more then one will use custom ImagePicker in case of LocalSource.photoLibrary. The default value is 1.

modal​Presentation​Style

@objc public var modalPresentationStyle: UIModalPresentationStyle = .currentContext

This settings determines the way we want to present document picker, image pickers and upload monitor. The default presentation style is .currentContext

available​Cloud​Sources

@objc public var availableCloudSources: [CloudSource]  

This setting determines what cloud sources are available when using the picker. By default, it contains all the supported cloud sources.

available​Local​Sources

@objc public var availableLocalSources: [LocalSource]  

This setting determines what local sources are available when using the picker. By default, it contains all the supported local sources.

document​Picker​Allowed​UTIs

@objc public var documentPickerAllowedUTIs: [String] = ["public.item"] 

This setting determines what document types can be picked when using Apple's document picker. By default, this contains ["public.item"].

cloud​Source​Allowed​UTIs

@objc public var cloudSourceAllowedUTIs: [String] = ["public.item"] 

This setting determines what document types can be picked from a cloud source. By default, this contains ["public.item"].

image​URLExport​Preset

@objc public var imageURLExportPreset: ImageURLExportPreset = .compatible

This setting determines the format used for exported images. Possible values are .compatible (for JPEG) and .current (for HEIF).

image​Export​Quality

@objc public var imageExportQuality: Float = 0.85

This setting determines the quality setting for images taken using the camera and exported either as HEIC or JPEG.

video​Export​Preset

@objc public var videoExportPreset: String = AVAssetExportPresetHEVCHighestQuality

This setting determines the format used for exported videos.

Some possible values are:

  • AVAssetExportPresetHEVCHighestQuality (for highest quality HEVC)

  • AVAssetExportPresetHighestQuality (for highest quality H.264)

For more possible values, please consult AVAssetExportSession.

The default value is AVAssetExportPresetHEVCHighestQuality

video​Quality

@objc public var videoQuality: UIImagePickerController.QualityType = .typeMedium

This setting determines the video recording quality for videos recorded using the camera. It is also used whenever picking a recorded movie. Specifically, if the video quality setting is lower than the video quality of an existing movie, displaying that movie in the picker results in transcoding the movie to the lower quality.

The default value is .typeMedium

photos​Picker​Filter

public var photosPickerFilter: [PhotosPickerFilter] = [.images, .livePhotos, .videos] 

This setting determines what kind of asset types can be picked when using the new photos picker (PHPickerViewController) that our SDK now uses by default on iOS 14+ devices. However, when running on older devices, our SDK will fallback to the old photos pickers and this setting will be ignored.

The default value is [.images, .livePhotos, .videos].

app​URLScheme

@available(*, deprecated, message: "Marked for removal in version 3.0", renamed: "callbackURLScheme")
    @objc public var appURLScheme: String?