Options
All
  • Public
  • Public/Protected
  • All
Menu

Javascript SDK for the Filestack API and content management system.



Table of Contents

What's in the box?

  • A multi-part uploader powered on the backend by the Filestack CIN.
  • An interface to the Filestack Processing Engine for transforming assets via URLs.
  • The Filestack Picker - an upload widget for the web that integrates over a dozen cloud providers and provides pre-upload image editing.

Installation

npm install filestack-js

API Documentation

https://filestack.github.io/filestack-js/

Usage

Browsers

ES module

import * as filestack from 'filestack-js';
const client = filestack.init('apikey');

UMD module

<script src="//static.filestackapi.com/filestack-js/{MAJOR_VERSION}.x.x/filestack.min.js" crossorigin="anonymous"></script>
<script>
  const client = filestack.init('apikey');
</script>

where {MAJOR_VERSION} is one of the MAJOR versions of the filestack-js ie:

<script src="//static.filestackapi.com/filestack-js/3.x.x/filestack.min.js" crossorigin="anonymous"></script>
<script>
  const client = filestack.init('apikey');
</script>

GZIP support

To speed up library loading you can use gzipped file available after adding gz to file extension

<script src="//static.filestackapi.com/filestack-js/{MAJOR_VERSION}.x.x/filestack.min.js.gz" crossorigin="anonymous"></script>
<script>
  const client = filestack.init('apikey');
</script>

SRI

Subresource Integrity (SRI) is a security feature that enables browsers to verify that files they fetch (for example, from a CDN) are delivered without unexpected manipulation. It works by allowing you to provide a cryptographic hash that a fetched file must match

To obtain sri hashes for filestack-js library check manifest.json file on CDN:

https://static.filestackapi.com/filestack-js/{LIBRARY_VERSION}/manifest.json
<script src="//static.filestackapi.com/filestack-js/{LIBRARY_VERSION}/filestack.min.js.gz" integrity="{FILE_HASH}" crossorigin="anonymous"></script>

Where {LIBRARY_VERSION} is currently used library version and {FILE_HASH} is one of the hashes from integrity field in manifest.json file

Node

CommonJS module

const client = require('filestack-js').init('apikey');

Module Overview

The package.json specifies two separate modules:

  • main for the CommonJS module (intended for Node runtimes)
  • browser for the pre-bundled ES module (intended for browser runtimes)

Node projects which depend on filestack-js will follow the main field in package.json. When building for the browser, newer tools (like Webpack, Rollup, and Parcel) follow the browser field, which will resolve to the pre-bundled ES module. Both modules follow the same API, but some methods behave differently based on their runtime. For example, client.upload treats the file argument as a file path in Node but in browsers it assumes a Blob object.

The pre-bundled browser module is also available in UMD format. This is useful if you are using script tags on a web page instead of bundling your application. It can be retrieved from both the Filestack CDN and the unpkg CDN:

Releases Info

Major releases will bo listed (with detailed examples) in releases folder starting from version 3.0.0

Live examples (JSFiddle)

Upload image
Multiupload
Open picker
Open picker in inline mode
Crop images
Multiple drop panes
Preview
Import using RequireJS
Retrieve image data
Transform image
Custom Picker CSS
Assign file to user

Examples can be run locally with:

npm run examples

Picker Quick Start

If you are here to use the picker widget, it can be initialized from the Filestack client by calling client.picker(options). Options for the picker are documented here.

The picker instance returned from client.picker can be controlled with a few methods:

  • open - Create the application and mount it into the DOM based on the displayMode.
  • close - Close the application and remove its resources from the DOM.
  • crop(files) - Create the application, mount it, and pre-select the passed files for cropping.
  • cancel - Cancel all uploads controlled by this instance.

Please see our examples above to learn more about customizing the picker for your use case.

Polyfills

If you target IE11 or iOS before 8.0 you will need to add a Promise and Symbol polyfill to your page or application.

Polyfills we recommend:**

Module (for bundling):

Script (for script tag):

Development

Most tests in this library are expected to interface with actual backend services. Because we like to run tests during development, these services are mocked during unit testing.

All tests are using Jest.

To run units:

npm test

Debugging

Filestack-js uses debug, so just run with environmental variable DEBUG set to fs.*.

Node

DEBUG=fs.* node example_upload.js

Browser

Debug's enable state is persisted by localStorage

localStorage.debug = 'fs:*'

And then refresh the page.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Contributing

We follow the conventional commits specification to ensure consistent commit messages and changelog formatting.

Index

Enumerations

Classes

Interfaces

Type aliases

Variables

Functions

Object literals

Type aliases

InputFile

InputFile: RawFile | NamedInputFile

NamedInputFile

NamedInputFile: object

Type declaration

  • file: RawFile
  • Optional name?: string

RawFile

RawFile: Blob | Buffer | File | string

SanitizeOptions

SanitizeOptions: false | true | object

Sanitizer Options

StoreParams

StoreParams: StoreBaseParams & object

Available options for store transformations

export
interface

StoreParams

StoreUploadOptions

StoreUploadOptions: StoreBaseParams & object

Variables

Const COMPLETE_TIMEOUT

COMPLETE_TIMEOUT: number = 1000 * 1

Const DEFAULT_PART_SIZE

DEFAULT_PART_SIZE: number = 6 * 1024 * 1024

Const DEFAULT_PROGRESS_INTERVAL

DEFAULT_PROGRESS_INTERVAL: 1000 = 1000

Const DEFAULT_STORE_LOCATION

DEFAULT_STORE_LOCATION: "s3" = "s3"

Const INTELLIGENT_CHUNK_SIZE

INTELLIGENT_CHUNK_SIZE: number = 8 * 1024 * 1024

Const INTELLIGENT_MOBILE_CHUNK_SIZE

INTELLIGENT_MOBILE_CHUNK_SIZE: number = 1024 * 1024

JSDOM

JSDOM: any

Const MIN_CHUNK_SIZE

MIN_CHUNK_SIZE: number = 32 * 1024

Const MIN_PART_SIZE

MIN_PART_SIZE: number = 5 * 1024 * 1024

Private Const PICKER_KEY

PICKER_KEY: "__fs_picker_token" = "__fs_picker_token"

Private Const PICKER_VERSION

PICKER_VERSION: "1.7.1" = "1.7.1"

Const RESPONSE_DEBUG_PREFIX

RESPONSE_DEBUG_PREFIX: "x-filestack-" = "x-filestack-"

Const base64Gif

base64Gif: "R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" = "R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="

Const base64Png

base64Png: "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==" = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg=="

Const base64Regexp

base64Regexp: RegExp = /data:([a-zA-Z]*\/[a-zA-Z]*);base64,([^\"]*)/i

Const base64Svg

base64Svg: "PHN2ZyBoZWlnaHQ9IjEwMCIgd2lkdGg9IjEwMCI+CiAgPGNpcmNsZSBjeD0iNTAiIGN5PSI1MCIgcj0iNDAiIHN0cm9rZT0iYmxhY2siIHN0cm9rZS13aWR0aD0iMyIgZmlsbD0icmVkIiAvPgogIFNvcnJ5LCB5b3VyIGJyb3dzZXIgZG9lcyBub3Qgc3VwcG9ydCBpbmxpbmUgU1ZHLiAgCjwvc3ZnPiA=" = "PHN2ZyBoZWlnaHQ9IjEwMCIgd2lkdGg9IjEwMCI+CiAgPGNpcmNsZSBjeD0iNTAiIGN5PSI1MCIgcj0iNDAiIHN0cm9rZT0iYmxhY2siIHN0cm9rZS13aWR0aD0iMyIgZmlsbD0icmVkIiAvPgogIFNvcnJ5LCB5b3VyIGJyb3dzZXIgZG9lcyBub3Qgc3VwcG9ydCBpbmxpbmUgU1ZHLiAgCjwvc3ZnPiA="

Const debug

debug: any = Debug('fs:upload:s3')

Const handleRegexp

handleRegexp: RegExp = /^[\w\-]{20}$/

Const htmlCommentsRegexp

htmlCommentsRegexp: RegExp = /<!--([\s\S]*?)-->/g

Let last

last: any

Returns unique time

Const mobileRegexp

mobileRegexp: RegExp = /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino|android|ipad|playbook|silk/i

Const mockAppendChild

mockAppendChild: Mock<any, any> = jest.fn()

Const mockList

mockList: Mock<any, any> = jest.fn().mockName('list').mockImplementation(data => {if (data && data.clouds.token) {return { token: testCloudToken };}return data;})

Const mockLogout

mockLogout: Mock<any, any> = jest.fn().mockName('logout').mockImplementation((url, data) => {const params = data ? JSON.parse(data) : {};if (data && params.clouds && params.clouds.token) {return { token: testCloudToken };}return data;})

Const mockMetadata

mockMetadata: Mock<any, any> = jest.fn().mockName('metadata').mockReturnValue('metadata')

Const mockPrefetch

mockPrefetch: Mock<any, any> = jest.fn().mockName('prefetch').mockReturnValue('prefetch')

Const mockStore

mockStore: Mock<any, any> = jest.fn().mockName('store').mockImplementation(params => {if (params && params.clouds && params.clouds.token) {return JSON.stringify({ token: testCloudToken });}return JSON.stringify(params);})

Const mockTokInit

mockTokInit: Mock<any, any> = jest.fn().mockName('tokInit').mockReturnValue('init')

Const mockTokStart

mockTokStart: Mock<any, any> = jest.fn().mockName('tokStart').mockReturnValue('start')

Const mockTokStop

mockTokStop: Mock<any, any> = jest.fn().mockName('tokStop').mockReturnValue('stop')

Const mockedTestFile

mockedTestFile: Buffer = Buffer.from('text text')

Const sanitizeOptions

sanitizeOptions: Mock<any, any> = jest.fn().mockName('sanitizeOptions')

Let scope

scope: any = nock(sessionURls.cloudApiUrl)

Const sessionURls

sessionURls: object = config.urls

Type declaration

  • cdnUrl: string
  • cloudApiUrl: string
  • fileApiUrl: string
  • pickerUrl: string
  • uploadApiUrl: string

Const svgRegexp

svgRegexp: RegExp = /^\s*(?:<\?xml[^>]*>\s*)?(?:<!doctype svg[^>]*\s*(?:\[?(?:\s*<![^>]*>\s*)*\]?)*[^>]*>\s*)?<svg[^>]*>[^]*<\/svg>\s*$/i

Const testApiKey

testApiKey: "API_KEY" = "API_KEY"

Const testCloudToken

testCloudToken: "testCloudToken" = "testCloudToken"

Const testTokArchiveId

testTokArchiveId: "ARCHIVE_ID" = "ARCHIVE_ID"

Const testTokSession

testTokSession: "TOK_SESSION" = "TOK_SESSION"

Const v

v: Validator = new Validator()

Const version

version: "@{VERSION}" = "@{VERSION}"

filestack-js version. Interpolated at build time.

Functions

Const b64

  • b64(data: string): string

Private Const b64toBlob

  • b64toBlob(b64Data: string, sliceSize?: number): Blob
  • Convert encoded base64 string or dataURI to blob

    Parameters

    • b64Data: string
    • Default value sliceSize: number = 512

      Byte quantity to split data into

    Returns Blob

Const createFile

  • createFile(size?: number, name?: string, type?: string): File

Const filterObject

  • filterObject(toFilter: any, requiredFields: string[]): any
  • Filter object to given fields

    Parameters

    • toFilter: any
    • requiredFields: string[]

    Returns any

Const getFile

Const getFileBrowser

Const getFileNode

Const getMimetype

  • getMimetype(file: Uint8Array | Buffer): string
  • Check if input is a svg

    Parameters

    • file: Uint8Array | Buffer

    Returns string

    • mimetype

Const getSecurity

  • Returns Filestack base64 policy and HMAC-SHA256 signature

    Example

    import * as filestack from 'filestack-js';
    
    const jsonPolicy = { 'expiry': 253381964415 };
    const security = filestack.getSecurity(jsonPolicy, '<YOUR_APP_SECRET>');

    Parameters

    Returns Security

Private Const getUrl

  • getUrl(session: Session, handle: string, opts?: any, security?: Security): string

Const getValidator

  • getValidator(schema: any): (Anonymous function)
  • Returns validator instance

    Parameters

    • schema: any

    Returns (Anonymous function)

Const init

Const isFileBase

Const isFileBlob

Const isFileBrowser

Const isFileBuffer

Const isFileNamed

Const isFilePath

Const isMobile

  • isMobile(): boolean
  • Returns if browser is a mobile device (if node env always return false)

    Returns boolean

Const isNode

  • isNode(): string

Const isSvg

  • isSvg(input: Uint8Array | Buffer): boolean
  • Check if input is a svg

    Parameters

    • input: Uint8Array | Buffer

    Returns boolean

Private Const md5

  • md5(data: any): string
  • Calculates a MD5 checksum for passed buffer

    Parameters

    • data: any

      Data to be hashed

    Returns string

    base64 encoded MD5 hash

Private Const metadata

Const normalizeProgress

  • normalizeProgress(current: any, last: any): any

Private Const picker

Const postWithRetry

  • postWithRetry(url: string, fields: Object, config?: AxiosRequestConfig, retryConfig?: RetryConfig): Promise<AxiosResponse>
  • Parameters

    • url: string
    • fields: Object
    • Default value config: AxiosRequestConfig = {}
    • Optional retryConfig: RetryConfig

    Returns Promise<AxiosResponse>

Private Const preview

Private Const readFile

  • readFile(file: any): Promise<any>

Private Const remove

  • remove(session: Session, handle?: string, skipStorage?: boolean, security?: Security): Promise<any>
  • Remove given file

    Parameters

    • session: Session
    • Optional handle: string
    • Optional skipStorage: boolean
    • Optional security: Security

    Returns Promise<any>

Private Const removeEmpty

  • removeEmpty(obj: any): any

Private Const requestWithSource

  • requestWithSource(retryConfig?: RetryConfig): AxiosInstance

Const requireNode

  • requireNode(name: string): any
  • Hides require from buindling by weback to browser

    Parameters

    • name: string

    Returns any

Private Const resolveCdnUrl

  • resolveCdnUrl(session: Session, handle: string): string
  • Resolve cdn url based on handle type

    Parameters

    • session: Session

      session object

    • handle: string

      file handle (hash, src://alias, url)

    Returns string

Private Const resolveHost

Private Const retrieve

Const sanitizeName

Const shouldRetry

  • shouldRetry(err: AxiosError): boolean

Private Const storeURL

Private Const toSnakeCase

  • toSnakeCase(original: object): object
  • Parameters

    • original: object
      • [index: string]: any

    Returns object

    • [index: string]: any

Private Const transform

  • Creates filestack transform url. Transform params can be provided in camelCase or snakeCase style

    Parameters

    • session: Session
    • url: string | string[]

      url, handle or array of elements

    • Default value options: TransformOptions = {}

      Transformation options

    • Default value b64: boolean = false

    Returns string

Const uniqueId

  • uniqueId(len?: number): string
  • Generates random string with provided length

    Parameters

    • Default value len: number = 10

    Returns string

Const uniqueTime

  • uniqueTime(): any

Const useDebugInterceptor

  • useDebugInterceptor(instance: any): void

Const useRetryPolicy

  • useRetryPolicy(instance: AxiosInstance, retryConfig: RetryConfig): number

Const validateWebhookSignature

Object literals

Const DefinitionsSchema

DefinitionsSchema: object

$schema

$schema: string = "http://json-schema.org/draft-07/schema#"

additionalProperties

additionalProperties: boolean = false

description

description: string = "Filestack common definitions"

title

title: string = "Filestack"

type

type: string = "object"

definitions

definitions: object

colorDef

colorDef: object

id

id: string = "colorDef"

oneOf

oneOf: (object | object)[] = [{type: 'string',pattern: '^([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$', // without # at the begining}, {type: 'string',enum: ['aliceblue', 'antiquewhite', 'aqua', 'aquamarine', 'azure', 'beige', 'bisque', 'black', 'blanchedalmond', 'blue', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'fractal', 'fuchsia', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'gray0', 'gray1', 'gray2', 'gray3', 'gray4', 'gray5', 'gray6', 'gray7', 'gray8', 'gray9', 'gray10', 'gray11', 'gray12', 'gray13', 'gray14', 'gray15', 'gray16', 'gray17', 'gray18', 'gray19', 'gray20', 'gray21', 'gray22', 'gray23', 'gray24', 'gray25', 'gray26', 'gray27', 'gray28', 'gray29', 'gray30', 'gray31', 'gray32', 'gray33', 'gray34', 'gray35', 'gray36', 'gray37', 'gray38', 'gray39', 'gray40', 'gray41', 'gray42', 'gray43', 'gray44', 'gray45', 'gray46', 'gray47', 'gray48', 'gray49', 'gray50', 'gray51', 'gray52', 'gray53', 'gray54', 'gray55', 'gray56', 'gray57', 'gray58', 'gray59', 'gray60', 'gray61', 'gray62', 'gray63', 'gray64', 'gray65', 'gray66', 'gray67', 'gray68', 'gray69', 'gray70', 'gray71', 'gray72', 'gray73', 'gray74', 'gray75', 'gray76', 'gray77', 'gray78', 'gray79', 'gray80', 'gray81', 'gray82', 'gray83', 'gray84', 'gray85', 'gray86', 'gray87', 'gray88', 'gray89', 'gray90', 'gray91', 'gray92', 'gray93', 'gray94', 'gray95', 'gray96', 'gray97', 'gray98', 'gray99', 'gray100', 'gray', 'green', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'lime', 'limegreen', 'linen', 'magenta', 'maroon', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'navy', 'none', 'oldlace', 'olive', 'olivedrab', 'orange', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'purple', 'red', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'silver', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'teal', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'white', 'whitesmoke', 'yellow', 'yellowgreen',],}]

facesDef

facesDef: object

id

id: string = "/facesDef"

oneOf

oneOf: (object | object | object)[] = [{type: 'string',enum: ['all'],}, {type: 'integer',minimum: 1,maximum: 1000,}, {type: 'array',uniqueItems: true,items: [{type: 'integer',minimum: 1,maximum: 1000,}],}]

locationsDef

locationsDef: object

enum

enum: string[] = ['s3', 'S3', 'rackspace', 'gcs', 'azure', 'dropbox']

id

id: string = "/locationsDef"

type

type: string = "string"

objectsDef

objectsDef: object

id

id: string = "/objectsDef"

items

items: object[] = [{type: 'array',additionalItems: false,minItems: 4,items: [{type: 'integer',minimum: 0,maximum: 10000,}, {type: 'integer',minimum: 0,maximum: 10000,}, {type: 'integer',minimum: 1,maximum: 10000,}, {type: 'integer',minimum: 1,maximum: 10000,}],}]

maxItems

maxItems: number = 50

minItems

minItems: number = 1

type

type: string = "array"

pageFormatDef

pageFormatDef: object

enum

enum: string[] = ['a2', 'a3', 'a4', 'a5', 'b4', 'b5', 'letter', 'legal', 'tabloid']

id

id: string = "/pageFormatDef"

type

type: string = "string"

pageRangeDef

pageRangeDef: object

id

id: string = "/pageRangeDef"

items

items: object[] = [{oneOf: [{type: 'integer',minimum: 1,}, {type: 'string',pattern: '^(\\d+(?:-\\d+)?)$|^(-\\d+)$|^(\\d+-)$',errorMessage: 'Param should be provided in one of the following formats: "1,2,3,5", "1-3", "1-", "-2" ',}],}]

type

type: string = "array"

uniqueItems

uniqueItems: boolean = true

positionDef

positionDef: object

default

default: string[] = ['middle', 'center']

id

id: string = "/positionDef"

oneOf

oneOf: (object | object)[] = [{type: 'string',enum: ['top','middle','bottom','left','center','right',],},{type: 'array',uniqueItems: true,additionalItems: false,minItems: 2,default: ['middle', 'center'],items: [{type: 'string',enum: ['top','middle','bottom',],}, {type: 'string',enum: ['left','center','right',],},],},]

regionsDef

regionsDef: object

enum

enum: string[] = ['us-east-1', 'us-east-2', 'us-west-1', 'us-west-2', 'eu-west-1', 'eu-west-2', 'eu-west-3', 'eu-central-1', 'ap-northeast-1', 'ap-northeast-2', 'ap-northeast-3', 'ap-southeast-1', 'ap-southeast-2', 'ap-south-1', 'sa-east-1']

id

id: string = "/regionsDef"

type

type: string = "string"

securityCallDef

securityCallDef: object

id

id: string = "/securityCallDef"

oneOf

oneOf: (object | object)[] = [{additionalProperties: false,type: 'string',enum: ['pick', 'read', 'stat', 'write', 'writeUrl', 'store', 'convert', 'remove', 'exif', 'runWorkflow'],}, {type: 'array',additionalProperties: false,items: [{minItems: 1,maxItems: 10,type: 'string',additionalProperties: false,enum: ['pick', 'read', 'stat', 'write', 'writeUrl', 'store', 'convert', 'remove', 'exif', 'runWorkflow'],}],}]

workflowsDef

workflowsDef: object

additionalItems

additionalItems: boolean = false

id

id: string = "/workflowsDef"

items

items: object[] = [{oneOf: [{type: 'string',}, {type: 'object',additionalProperties: false,properties: {id: {type: 'string',},},}],}]

maxItems

maxItems: number = 20

minItems

minItems: number = 1

type

type: string = "array"

Const MetadataParamsSchema

MetadataParamsSchema: object

$schema

$schema: string = "http://json-schema.org/draft-07/schema#"

additionalProperties

additionalProperties: boolean = false

description

description: string = "Filestack Metadata Options"

title

title: string = "Filestack Metadata"

type

type: string = "object"

properties

properties: object

cloud

cloud: object

type

type: string = "boolean"

container

container: object

type

type: string = "boolean"

exif

exif: object

type

type: string = "boolean"

filename

filename: object

type

type: string = "boolean"

height

height: object

type

type: string = "boolean"

location

location: object

type

type: string = "boolean"

md5

md5: object

type

type: string = "boolean"

metadata

metadata: object

type

type: string = "boolean"

mimetype

mimetype: object

type

type: string = "boolean"

path

path: object

type

type: string = "boolean"

sha1

sha1: object

type

type: string = "boolean"

sha224

sha224: object

type

type: string = "boolean"

sha256

sha256: object

type

type: string = "boolean"

sha384

sha384: object

type

type: string = "boolean"

sha512

sha512: object

type

type: string = "boolean"

size

size: object

type

type: string = "boolean"

sourceUrl

sourceUrl: object

type

type: string = "boolean"

uploaded

uploaded: object

type

type: string = "boolean"

width

width: object

type

type: string = "boolean"

writeable

writeable: object

type

type: string = "boolean"

Const PickerParamsSchema

PickerParamsSchema: object

$schema

$schema: string = "http://json-schema.org/draft-07/schema#"

additionalProperties

additionalProperties: boolean = false

description

description: string = "Filestack Picker Options"

title

title: string = "Filestack Picker"

type

type: string = "object"

properties

properties: object

accept

accept: object

additionalProperties

additionalProperties: boolean = false

oneOf

oneOf: (object | object)[] = [{type: 'string',},{type: 'array',minItems: 1,items: [{type: 'string',},],},]

allowManualRetry

allowManualRetry: object

type

type: string = "boolean"

cleanupImageExif

cleanupImageExif: object

oneOf

oneOf: (object | object)[] = [{type: 'boolean',},{type: 'object',additionalProperties: false,properties: {keepOrientation: {type: 'boolean',},keepICCandAPP: {type: 'boolean',},},},]

concurrency

concurrency: object

maximum

maximum: number = 20

minimum

minimum: number = 1

type

type: string = "integer"

container

container: object

format

format: string = "HTMLContainer"

customAuthText

customAuthText: object

type

type: string = "object"

patternProperties

patternProperties: object

.*

.*: object

additionalProperties

additionalProperties: boolean = false

required

required: string[] = ['top', 'bottom']

type

type: string = "object"

properties

properties: object

bottom

bottom: object

type

type: string = "string"

top

top: object

type

type: string = "string"

customSourceContainer

customSourceContainer: object

type

type: string = "string"

customSourceName

customSourceName: object

type

type: string = "string"

customSourcePath

customSourcePath: object

type

type: string = "string"

customText

customText: object

type

type: string = "object"

patternProperties

patternProperties: object

.*

.*: object

type

type: string = "string"

disableStorageKey

disableStorageKey: object

type

type: string = "boolean"

disableThumbnails

disableThumbnails: object

type

type: string = "boolean"

disableTransformer

disableTransformer: object

type

type: string = "boolean"

displayMode

displayMode: object

enum

enum: string[] = ['inline', 'overlay', 'dropPane']

type

type: string = "string"

dropPane

dropPane: object

type

type: string = "object"

properties

properties: object

cropFiles

cropFiles: object

type

type: string = "boolean"

customText

customText: object

type

type: string = "string"

disableClick

disableClick: object

type

type: string = "boolean"

onClick

onClick: object

format

format: string = "callback"

onDragEnter

onDragEnter: object

format

format: string = "callback"

onDragLeave

onDragLeave: object

format

format: string = "callback"

onDragOver

onDragOver: object

format

format: string = "callback"

onDrop

onDrop: object

format

format: string = "callback"

onError

onError: object

format

format: string = "callback"

onProgress

onProgress: object

format

format: string = "callback"

onSuccess

onSuccess: object

format

format: string = "callback"

overlay

overlay: object

type

type: string = "boolean"

showIcon

showIcon: object

type

type: string = "boolean"

showProgress

showProgress: object

type

type: string = "boolean"

errorsTimeout

errorsTimeout: object

minimum

minimum: number = 0

type

type: string = "number"

exposeOriginalFile

exposeOriginalFile: object

type

type: string = "boolean"

fromSources

fromSources: object

items

items: object[] = [{type: 'string',additionalProperties: false,enum: ['local_file_system','url','imagesearch','facebook','instagram','googledrive','dropbox','webcam','video','audio','box','github','gmail','picasa','onedrive','onedriveforbusiness','clouddrive','googlephotos','customsource',],},]

type

type: string = "array"

globalDropZone

globalDropZone: object

type

type: string = "boolean"

hideModalWhenUploading

hideModalWhenUploading: object

type

type: string = "boolean"

imageDim

imageDim: object

items

items: object[] = [{type: 'integer',minimum: 1,},]

maxItems

maxItems: number = 2

minItems

minItems: number = 2

type

type: string = "array"

imageMax

imageMax: object

items

items: object[] = [{type: 'integer',minimum: 1,},]

maxItems

maxItems: number = 2

minItems

minItems: number = 2

type

type: string = "array"

imageMin

imageMin: object

items

items: object[] = [{type: 'integer',minimum: 1,},]

maxItems

maxItems: number = 2

minItems

minItems: number = 2

type

type: string = "array"

imageMinMaxBlock

imageMinMaxBlock: object

default

default: boolean = false

type

type: string = "boolean"

lang

lang: object

enum

enum: string[] = ['ca', 'da', 'de', 'en', 'es', 'fr', 'he', 'it', 'ja', 'ko', 'nl', 'no', 'pl', 'pt', 'sv', 'ru', 'vi', 'zh', 'tr']

type

type: string = "string"

maxFiles

maxFiles: object

maximum

maximum: number = 1000000

minimum

minimum: number = 1

type

type: string = "integer"

maxSize

maxSize: object

minimum

minimum: number = 1

type

type: string = "integer"

minFiles

minFiles: object

maximum

maximum: number = 1000000

minimum

minimum: number = 1

type

type: string = "integer"

modalSize

modalSize: object

items

items: object[] = [{type: 'integer',minimum: 1,maximum: 1000000,},]

maxItems

maxItems: number = 2

minItems

minItems: number = 2

type

type: string = "array"

onCancel

onCancel: object

format

format: string = "callback"

onClose

onClose: object

format

format: string = "callback"

onFileSelected

onFileSelected: object

format

format: string = "callback"

onFileUploadFailed

onFileUploadFailed: object

format

format: string = "callback"

onFileUploadFinished

onFileUploadFinished: object

format

format: string = "callback"

onFileUploadProgress

onFileUploadProgress: object

format

format: string = "callback"

onFileUploadStarted

onFileUploadStarted: object

format

format: string = "callback"

onOpen

onOpen: object

format

format: string = "callback"

onUploadDone

onUploadDone: object

format

format: string = "callback"

onUploadStarted

onUploadStarted: object

format

format: string = "callback"

rootId

rootId: object

type

type: string = "string"

startUploadingWhenMaxFilesReached

startUploadingWhenMaxFilesReached: object

type

type: string = "boolean"

storeTo

storeTo: object

additionalProperties

additionalProperties: boolean = false

type

type: string = "object"

properties

properties: object

access

access: object

enum

enum: string[] = ['public', 'private']

type

type: string = "string"

container

container: object

type

type: string = "string"

filename

filename: object

type

type: string = "string"

location

location: object

$ref

$ref: string = "locationsDef"

path

path: object

type

type: string = "string"

region

region: object

type

type: string = "string"

workflows

workflows: object

$ref

$ref: string = "workflowsDef"

transformations

transformations: object

additionalProperties

additionalProperties: boolean = false

type

type: string = "object"

properties

properties: object

circle

circle: object

type

type: string = "boolean"

crop

crop: object

oneOf

oneOf: (object | object)[] = [{type: 'boolean',},{type: 'object',additionalProperties: false,properties: {force: {type: 'boolean',},aspectRatio: {type: 'number',},},},]

force

force: object

type

type: string = "boolean"

rotate

rotate: object

type

type: string = "boolean"

uploadConfig

uploadConfig: object

additionalProperties

additionalProperties: boolean = false

properties

properties: object = UploadParamsSchema.properties

Type declaration

  • concurrency: object
    • maximum: number
    • minimum: number
    • type: string
  • intelligent: object
    • oneOf: (object | object)[]
  • intelligentChunkSize: object
    • type: string
  • onProgress: object
    • format: string
  • onRetry: object
    • format: string
  • partSize: object
    • minimum: number
    • type: string
  • progressInterval: object
    • minimum: number
    • type: string
  • retry: object
    • maximum: number
    • minimum: number
    • type: string
  • retryFactor: object
    • type: string
  • retryMaxTime: object
    • type: string
  • timeout: object
    • maximum: number
    • minimum: number
    • type: string

type

type: string = "object"

uploadInBackground

uploadInBackground: object

type

type: string = "boolean"

videoResolution

videoResolution: object

type

type: string = "string"

viewType

viewType: object

enum

enum: string[] = ['grid', 'list']

type

type: string = "string"

Const PreviewParamsSchema

PreviewParamsSchema: object

$schema

$schema: string = "http://json-schema.org/draft-07/schema#"

additionalProperties

additionalProperties: boolean = false

description

description: string = "Filestack Preview Options"

title

title: string = "Filestack Preview"

type

type: string = "object"

properties

properties: object

css

css: object

type

type: string = "string"

id

id: object

type

type: string = "string"

Const RetrieveParamsSchema

RetrieveParamsSchema: object

$schema

$schema: string = "http://json-schema.org/draft-07/schema#"

additionalProperties

additionalProperties: boolean = false

description

description: string = "Filestack Retrieve Options"

title

title: string = "Filestack Retrieve"

type

type: string = "object"

properties

properties: object

cache

cache: object

type

type: string = "boolean"

dl

dl: object

type

type: string = "boolean"

extension

extension: object

type

type: string = "string"

head

head: object

type

type: string = "boolean"

metadata

metadata: object

type

type: string = "boolean"

Const SecurityParamsSchema

SecurityParamsSchema: object

$schema

$schema: string = "http://json-schema.org/draft-07/schema#"

additionalProperties

additionalProperties: boolean = false

description

description: string = "Filestack Security Options"

title

title: string = "Filestack Security"

type

type: string = "object"

properties

properties: object

call

call: object

$ref

$ref: string = "securityCallDef"

container

container: object

type

type: string = "string"

expiry

expiry: object

type

type: string = "number"

handle

handle: object

type

type: string = "string"

maxSize

maxSize: object

type

type: string = "number"

minSize

minSize: object

type

type: string = "number"

path

path: object

type

type: string = "string"

url

url: object

type

type: string = "string"

Const StoreParamsSchema

StoreParamsSchema: object

$schema

$schema: string = "http://json-schema.org/draft-07/schema#"

additionalProperties

additionalProperties: boolean = false

description

description: string = "Filestack Store Options"

title

title: string = "Filestack Store"

type

type: string = "object"

properties

properties: object

access

access: object

default

default: string = "private"

enum

enum: string[] = ['public', 'private']

type

type: string = "string"

base64decode

base64decode: object

type

type: string = "boolean"

container

container: object

type

type: string = "string"

filename

filename: object

oneOf

oneOf: (object | object)[] = [{type: 'string',}, {format: 'callback',}]

location

location: object

$ref

$ref: string = "locationsDef"

path

path: object

type

type: string = "string"

region

region: object

$ref

$ref: string = "regionsDef"

sanitizer

sanitizer: object

oneOf

oneOf: (object | object)[] = [{type: 'boolean',}, {type: 'object',additionalProperties: false,properties: {exclude: {type: 'array',items: [{type: 'string',}],},replacement: {type: 'string',},},}]

workflows

workflows: object

$ref

$ref: string = "workflowsDef"

Const TransformSchema

TransformSchema: object

$schema

$schema: string = "http://json-schema.org/draft-07/schema#"

additionalProperties

additionalProperties: boolean = false

description

description: string = "Filestack transformations parameters"

title

title: string = "Filestack Transformations"

type

type: string = "object"

properties

properties: object

ascii

ascii: object

oneOf

oneOf: (object | object)[] = [{type: 'boolean',}, {type: 'object',properties: {foreground: {'$ref': 'colorDef',default: '000000FF',},background: {'$ref': 'colorDef',default: 'FFFFFFFF',},colored: {type: 'boolean',default: false,},size: {type: 'integer',minimum: 10,maximum: 100,default: 100,},reverse: {type: 'boolean',default: false,},},additionalProperties: false,}]

blackwhite

blackwhite: object

oneOf

oneOf: (object | object)[] = [{type: 'boolean',}, {type: 'object',properties: {threshold: {type: 'integer',minimum: 0,maximum: 100,default: 50,},},additionalProperties: false,}]

blur

blur: object

oneOf

oneOf: (object | object)[] = [{type: 'boolean',}, {type: 'object',properties: {amount: {type: 'integer',minimum: 0,maximum: 20,default: 2,},},additionalProperties: false,}]

blur_faces

blur_faces: object

oneOf

oneOf: (object | object)[] = [{type: 'boolean',}, {type: 'object',properties: {faces: {'$ref': 'facesDef',default: 'all',},maxsize: {type: 'number',minimum: 0,maximum: 10000,default: 0.35,},minsize: {type: 'number',minimum: 0,maximum: 10000,default: 0.35,},buffer: {type: 'integer',minimum: 0,maximum: 10000,},amount: {type: 'number',minimum: 0,maximum: 10,default: 10,},blur: {type: 'number',minimum: 0,maximum: 20,default: 4,},type: {type: 'string',enum: ['rect', 'oval'],default: 'rect',},},additionalProperties: false,}]

border

border: object

oneOf

oneOf: (object | object)[] = [{type: 'boolean',}, {type: 'object',properties: {color: {'$ref': 'colorDef',},background: {'$ref': 'colorDef',},width: {type: 'integer',minimum: 0,maximum: 1000,},},additionalProperties: false,}]

cache

cache: object

oneOf

oneOf: (object | object)[] = [{type: 'boolean',}, {type: 'object',properties: {expiry: {type: 'integer',},},}]

circle

circle: object

oneOf

oneOf: (object | object)[] = [{type: 'boolean',}, {type: 'object',properties: {background: {'$ref': 'colorDef',},},additionalProperties: false,}]

collage

collage: object

additionalProperties

additionalProperties: boolean = false

required

required: string[] = ['width', 'height', 'files']

type

type: string = "object"

properties

properties: object

autorotate

autorotate: object

default

default: boolean = false

type

type: string = "boolean"

color

color: object

$ref

$ref: string = "colorDef"

default

default: string = "FFFFFFFF"

files

files: object

items

items: object[] = [{type: 'string',}]

minItems

minItems: number = 1

type

type: string = "array"

fit

fit: object

enum

enum: string[] = ['auto', 'crop']

type

type: string = "string"

height

height: object

maximum

maximum: number = 10000

minimum

minimum: number = 0

type

type: string = "integer"

margin

margin: object

default

default: number = 10

maximum

maximum: number = 100

minimum

minimum: number = 1

type

type: string = "integer"

width

width: object

maximum

maximum: number = 10000

minimum

minimum: number = 0

type

type: string = "integer"

compress

compress: object

additionalProperties

additionalProperties: boolean = false

oneOf

oneOf: (object | object)[] = [{type: 'boolean',}, {type: 'object',properties: {metadata: {type: 'boolean',default: false,},},}]

crop

crop: object

required

required: string[] = ['dim']

type

type: string = "object"

properties

properties: object

dim

dim: object

additionalItems

additionalItems: boolean = false

items

items: object[] = [{type: 'integer',minimum: 0,maximum: 100000,}, {type: 'integer',minimum: 0,maximum: 100000,}, {type: 'integer',minimum: 1,maximum: 100000,}, {type: 'integer',minimum: 1,maximum: 100000,}]

minItems

minItems: number = 4

type

type: string = "array"

crop_faces

crop_faces: object

oneOf

oneOf: (object | object)[] = [{type: 'boolean',}, {type: 'object',properties: {faces: {default: 1,'$ref': 'facesDef',},width: {type: 'number',minimum: 1,maximum: 10000,},height: {type: 'number',minimum: 1,maximum: 10000,},maxsize: {type: 'number',minimum: 0,maximum: 10000,default: 0.35,},minsize: {type: 'number',minimum: 0,maximum: 10000,default: 0.35,},buffer: {type: 'integer',minimum: 0,maximum: 10000,},mode: {type: 'string',enum: ['crop', 'thumb', 'fill'],default: 'thumb',},},additionalProperties: false,}]

detect_faces

detect_faces: object

oneOf

oneOf: (object | object)[] = [{type: 'boolean',}, {type: 'object',properties: {maxsize: {type: 'number',minimum: 0,maximum: 10000,default: 0.35,},minsize: {type: 'number',minimum: 0,maximum: 10000,default: 0.35,},export: {type: 'boolean',},color: {'$ref': 'colorDef',default: '000000FF',},},additionalProperties: false,}]

enhance

enhance: object

additionalProperties

additionalProperties: boolean = false

type

type: string = "boolean"

fallback

fallback: object

additionalProperties

additionalProperties: boolean = false

required

required: string[] = ['handle']

type

type: string = "object"

properties

properties: object

cache

cache: object

maximum

maximum: number = 31536000

minimum

minimum: number = 1

type

type: string = "integer"

handle

handle: object

type

type: string = "string"

flip

flip: object

additionalProperties

additionalProperties: boolean = false

type

type: string = "boolean"

flop

flop: object

additionalProperties

additionalProperties: boolean = false

type

type: string = "boolean"

imagesize

imagesize: object

additionalProperties

additionalProperties: boolean = false

type

type: string = "boolean"

metadata

metadata: object

additionalProperties

additionalProperties: boolean = false

type

type: string = "object"

params

params: object

additionalItems

additionalItems: boolean = false

minItems

minItems: number = 0

type

type: string = "array"

uniqueItems

uniqueItems: boolean = true

items

items: object

enum

enum: string[] = ['filename','mimetype','size','width','height','writeable','path','container','cloud','exif','source_url','md5','sha256','sha1','sha512',]

type

type: string = "string"

minify_css

minify_css: object

additionalProperties

additionalProperties: boolean = false

type

type: string = "object"

properties

properties: object

gzip

gzip: object

type

type: string = "boolean"

level

level: object

enum

enum: number[] = [1, 2]

type

type: string = "number"

minify_js

minify_js: object

additionalProperties

additionalProperties: boolean = false

type

type: string = "object"

properties

properties: object

gzip

gzip: object

type

type: string = "boolean"

keep_class_name

keep_class_name: object

type

type: string = "boolean"

keep_fn_name

keep_fn_name: object

type

type: string = "boolean"

mangle

mangle: object

type

type: string = "boolean"

merge_vars

merge_vars: object

type

type: string = "boolean"

remove_console

remove_console: object

type

type: string = "boolean"

remove_undefined

remove_undefined: object

type

type: string = "boolean"

targets

targets: object

type

type: string = "string"

use_babel_polyfill

use_babel_polyfill: object

type

type: string = "boolean"

modulate

modulate: object

oneOf

oneOf: (object | object)[] = [{type: 'boolean',}, {type: 'object',properties: {brightness: {type: 'integer',minimum: 0,maximum: 10000,default: 100,},saturation: {type: 'integer',minimum: 0,maximum: 10000,default: 100,},hue: {type: 'integer',minimum: 0,maximum: 359,default: 0,},},additionalProperties: false,}]

monochrome

monochrome: object

additionalProperties

additionalProperties: boolean = false

type

type: string = "boolean"

negative

negative: object

additionalProperties

additionalProperties: boolean = false

type

type: string = "boolean"

no_metadata

no_metadata: object

additionalProperties

additionalProperties: boolean = false

type

type: string = "boolean"

oil_paint

oil_paint: object

oneOf

oneOf: (object | object)[] = [{type: 'boolean',}, {type: 'object',properties: {amount: {type: 'integer',minimum: 2,maximum: 100,default: 2,},},additionalProperties: false,}]

output

output: object

additionalProperties

additionalProperties: boolean = false

type

type: string = "object"

properties

properties: object

background

background: object

$ref

$ref: string = "colorDef"

colorspace

colorspace: object

default

default: string = "rgb"

enum

enum: string[] = ['rgb', 'cmyk', 'input']

type

type: string = "string"

compress

compress: object

type

type: string = "boolean"

density

density: object

maximum

maximum: number = 500

minimum

minimum: number = 1

type

type: string = "integer"

docinfo

docinfo: object

default

default: boolean = false

type

type: string = "boolean"

format

format: object

enum

enum: string[] = ['doc', 'docx', 'html', 'jpg', 'odp', 'ods', 'odt', 'pjpg', 'pdf', 'png', 'ppt', 'pptx', 'svg', 'txt', 'webp', 'xls', 'xlsx']

type

type: string = "string"

page

page: object

maximum

maximum: number = 99999

minimum

minimum: number = 1

type

type: string = "integer"

pageformat

pageformat: object

enum

enum: string[] = ['a2', 'a3', 'a4', 'a5', 'b4', 'b5', 'letter', 'legal', 'tabloid']

type

type: string = "string"

pageorientation

pageorientation: object

enum

enum: string[] = ['landscape', 'portrait']

type

type: string = "string"

quality

quality: object

oneOf

oneOf: (object | object)[] = [{type: 'string',enum: ['input'],}, {type: 'integer',minimum: 1,maximum: 100,default: 95,}]

secure

secure: object

default

default: boolean = false

type

type: string = "boolean"

strip

strip: object

default

default: boolean = false

type

type: string = "boolean"

partial_blur

partial_blur: object

required

required: string[] = ['objects']

type

type: string = "object"

properties

properties: object

amount

amount: object

maximum

maximum: number = 20

minimum

minimum: number = 0

type

type: string = "number"

blur

blur: object

maximum

maximum: number = 20

minimum

minimum: number = 0

type

type: string = "number"

objects

objects: object

$ref

$ref: string = "objectsDef"

type

type: object

enum

enum: string[] = ['rect', 'oval']

type

type: string = "string"

partial_pixelate

partial_pixelate: object

required

required: string[] = ['objects']

type

type: string = "object"

properties

properties: object

amount

amount: object

maximum

maximum: number = 100

minimum

minimum: number = 2

type

type: string = "number"

blur

blur: object

maximum

maximum: number = 20

minimum

minimum: number = 0

type

type: string = "number"

objects

objects: object

$ref

$ref: string = "objectsDef"

type

type: object

enum

enum: string[] = ['rect', 'oval']

type

type: string = "string"

pdfconvert

pdfconvert: object

additionalProperties

additionalProperties: boolean = false

anyOf

anyOf: object[] = [{required: ['pageorientation'],}, {required: ['pageformat'],}, {required: ['pages'],}]

type

type: string = "object"

properties

properties: object

pageformat

pageformat: object

$ref

$ref: string = "pageFormatDef"

pageorientation

pageorientation: object

enum

enum: string[] = ['portrait', 'landscape']

type

type: string = "string"

pages

pages: object

$ref

$ref: string = "pageRangeDef"

pdfinfo

pdfinfo: object

oneOf

oneOf: (object | object)[] = [{type: 'boolean',}, {type: 'object',properties: {colorinfo: {type: 'boolean',},},}]

pixelate

pixelate: object

oneOf

oneOf: (object | object)[] = [{type: 'boolean',}, {type: 'object',properties: {amount: {type: 'integer',minimum: 2,maximum: 100,default: 2,},},additionalProperties: false,}]

pixelate_faces

pixelate_faces: object

oneOf

oneOf: (object | object)[] = [{type: 'boolean',}, {type: 'object',properties: {faces: {'$ref': 'facesDef',default: 'all',},maxsize: {type: 'number',minimum: 0,maximum: 10000,default: 0.35,},minsize: {type: 'number',minimum: 0,maximum: 10000,default: 0.35,},buffer: {type: 'integer',minimum: 0,maximum: 10000,},amount: {type: 'integer',minimum: 2,maximum: 100,default: 10,},blur: {type: 'number',minimum: 0,maximum: 20,default: 4,},type: {type: 'string',enum: ['rect', 'oval'],default: 'rect',},},additionalProperties: false,}]

pjpg

pjpg: object

oneOf

oneOf: (object | object)[] = [{type: 'boolean',}, {type: 'object',additionalProperties: false,properties: {quality: {type: 'integer',minimum: 0,maximum: 100,},metadata: {type: 'boolean',default: false,},},}]

polaroid

polaroid: object

oneOf

oneOf: (object | object)[] = [{type: 'boolean',}, {type: 'object',properties: {rotate: {type: 'integer',minimum: 0,maximum: 359,},color: {'$ref': 'colorDef',default: 'snow',},background: {'$ref': 'colorDef',},},additionalProperties: false,}]

quality

quality: object

additionalProperties

additionalProperties: boolean = false

type

type: string = "object"

properties

properties: object

value

value: object

maximum

maximum: number = 100

minimum

minimum: number = 1

type

type: string = "integer"

redeye

redeye: object

additionalProperties

additionalProperties: boolean = false

type

type: string = "boolean"

resize

resize: object

additionalProperties

additionalProperties: boolean = false

anyOf

anyOf: object[] = [{ required: ['width'] },{ required: ['height'] },]

type

type: string = "object"

properties

properties: object

align

align: object

$ref

$ref: string = "positionDef"

default

default: string = "center"

fit

fit: object

default

default: string = "clip"

enum

enum: string[] = ['clip', 'crop', 'scale' ,'max']

type

type: string = "string"

height

height: object

maximum

maximum: number = 10000

minimum

minimum: number = 0

type

type: string = "number"

width

width: object

maximum

maximum: number = 10000

minimum

minimum: number = 0

type

type: string = "number"

rotate

rotate: object

additionalProperties

additionalProperties: boolean = false

type

type: string = "object"

properties

properties: object

background

background: object

$ref

$ref: string = "colorDef"

default

default: string = "FFFFFFFF"

deg

deg: object

oneOf

oneOf: (object | object)[] = [{type: 'string',enum: ['exif'],}, {type: 'number',minimum: 0,maximum: 359,}]

exif

exif: object

type

type: string = "boolean"

rounded_corners

rounded_corners: object

oneOf

oneOf: (object | object)[] = [{type: 'boolean',}, {type: 'object',properties: {radius: {oneOf: [{type: 'integer',minimum: 1,maximum: 10000,}, {type: 'string',enum: ['max'],}],},blur: {type: 'number',minimum: 0,maximum: 20,default: 0.3,},background: {'$ref': 'colorDef',},},additionalProperties: false,}]

security

security: object

additionalProperties

additionalProperties: boolean = false

required

required: string[] = ['policy', 'signature']

type

type: string = "object"

properties

properties: object

policy

policy: object

type

type: string = "string"

signature

signature: object

type

type: string = "string"

sepia

sepia: object

oneOf

oneOf: (object | object)[] = [{type: 'boolean',}, {type: 'object',properties: {tone: {type: 'integer',minimum: 0,maximum: 100,default: 80,},},additionalProperties: false,}]

sfw

sfw: object

additionalProperties

additionalProperties: boolean = false

type

type: string = "boolean"

shadow

shadow: object

oneOf

oneOf: (object | object)[] = [{type: 'boolean',}, {type: 'object',properties: {blur: {type: 'number',minimum: 0,maximum: 20,default: 100,},opacity: {type: 'integer',minimum: 0,maximum: 100,default: 60,},vector: {type: 'array',additionalItems: false,minItems: 2,items: [{type: 'integer',minimum: -1000,maximum: 1000,default: 4,}, {type: 'integer',minimum: -1000,maximum: 1000,default: 4,}],},color: {'$ref': 'colorDef',},background: {'$ref': 'colorDef',},},additionalProperties: false,}]

sharpen

sharpen: object

oneOf

oneOf: (object | object)[] = [{type: 'boolean',}, {type: 'object',properties: {amount: {type: 'integer',minimum: 0,maximum: 20,default: 2,},},additionalProperties: false,}]

store

store: object

oneOf

oneOf: (object | object)[] = [{type: 'boolean',}, {type: 'object',additionalProperties: false,properties: {filename: {type: 'string',},location: {'$ref': 'locationsDef',},path: {type: 'string',},container: {type: 'string',},region: {'$ref': 'regionsDef',},access: {type: 'string',enum: ['public', 'private'],default: 'private',},base64decode: {type: 'boolean',},workflows: {'$ref': 'workflowsDef',},},}]

tags

tags: object

additionalProperties

additionalProperties: boolean = false

type

type: string = "boolean"

torn_edges

torn_edges: object

oneOf

oneOf: (object | object)[] = [{type: 'boolean',}, {type: 'object',properties: {spread: {type: 'array',additionalItems: false,minItems: 2,items: [{type: 'integer',minimum: 1,maximum: 10000,default: 1,}, {type: 'integer',minimum: 1,maximum: 10000,default: 10,}],},background: {'$ref': 'colorDef',},},additionalProperties: false,}]

upscale

upscale: object

oneOf

oneOf: (object | object)[] = [{type: 'boolean',}, {type: 'object',properties: {noise: {type: 'string',enum: ['none', 'low', 'medium', 'high'],default: 'none',},upscale: {type: 'boolean',default: true,},style: {type: 'string',enum: ['artwork', 'photo'],default: 'photo',},},additionalProperties: false,}]

urlscreenshot

urlscreenshot: object

oneOf

oneOf: (object | object)[] = [{type: 'boolean',}, {type: 'object',properties: {agent: {type : 'string',enum: ['desktop', 'mobile'],default: 'desktop',},width: {type: 'integer',minimum: 1,maximum: 1920,default: 1024,},height: {type: 'integer',minimum: 1,maximum: 8000,default: 768,},mode: {type: 'string',enum: ['all', 'window'],default: 'all',},delay: {type: 'integer',minimum: 0,maximum: 20000,default: 1000,},orientation: {type: 'string',enum: ['portrait', 'landscape'],default: 'portrait',},device: {type: 'string',default: '',},},additionalProperties: false,}]

video_convert

video_convert: object

additionalProperties

additionalProperties: boolean = false

type

type: string = "object"

properties

properties: object

access

access: object

default

default: string = "public"

enum

enum: string[] = ['public', 'private']

type

type: string = "string"

aspect_mode

aspect_mode: object

default

default: string = "letterbox"

enum

enum: string[] = ['letterbox', 'pad', 'crop', 'preserve', 'constrain']

type

type: string = "string"

audio_bitrate

audio_bitrate: object

maximum

maximum: number = 999

minimum

minimum: number = 1

type

type: string = "integer"

audio_channels

audio_channels: object

maximum

maximum: number = 12

minimum

minimum: number = 1

type

type: string = "integer"

audio_sample_rate

audio_sample_rate: object

maximum

maximum: number = 99999

minimum

minimum: number = 1

type

type: string = "integer"

clip_length

clip_length: object

pattern

pattern: string = `^([0-1]?\\d|2[0-3])(?::([0-5]?\\d))?(?::([0-5]?\\d))?$`

type

type: string = "string"

clip_offset

clip_offset: object

pattern

pattern: string = `^([0-1]?\\d|2[0-3])(?::([0-5]?\\d))?(?::([0-5]?\\d))?$`

type

type: string = "string"

container

container: object

type

type: string = "string"

extname

extname: object

type

type: string = "string"

filename

filename: object

type

type: string = "string"

force

force: object

type

type: string = "boolean"

fps

fps: object

maximum

maximum: number = 300

minimum

minimum: number = 1

type

type: string = "integer"

frame_count

frame_count: object

default

default: number = 1

maximum

maximum: number = 1

minimum

minimum: number = 1

type

type: string = "integer"

height

height: object

maximum

maximum: number = 4096

minimum

minimum: number = 1

type

type: string = "integer"

keyframe_interval

keyframe_interval: object

maximum

maximum: number = 250

minimum

minimum: number = 250

type

type: string = "integer"

location

location: object

$ref

$ref: string = "locationsDef"

path

path: object

type

type: string = "string"

preset

preset: object

type

type: string = "string"

title

title: object

type

type: string = "string"

two_pass

two_pass: object

type

type: string = "boolean"

upscale

upscale: object

type

type: string = "boolean"

video_bitrate

video_bitrate: object

maximum

maximum: number = 5000

minimum

minimum: number = 1

type

type: string = "integer"

watermark_bottom

watermark_bottom: object

maximum

maximum: number = 9999

minimum

minimum: number = 0

type

type: string = "integer"

watermark_left

watermark_left: object

maximum

maximum: number = 9999

minimum

minimum: number = 0

type

type: string = "integer"

watermark_right

watermark_right: object

maximum

maximum: number = 9999

minimum

minimum: number = 0

type

type: string = "integer"

watermark_top

watermark_top: object

maximum

maximum: number = 9999

minimum

minimum: number = 0

type

type: string = "integer"

watermark_url

watermark_url: object

type

type: string = "string"

width

width: object

maximum

maximum: number = 4096

minimum

minimum: number = 1

type

type: string = "integer"

vignette

vignette: object

oneOf

oneOf: (object | object)[] = [{type: 'boolean',}, {type: 'object',properties: {amount: {type: 'integer',minimum: 0,maximum: 100,default: 20,},blurmode: {type: 'string',enum: ['gaussian', 'linear'],default: 'gaussian',},background: {'$ref': 'colorDef',},},additionalProperties: false,}]

watermark

watermark: object

additionalProperties

additionalProperties: boolean = false

required

required: string[] = ['file',]

type

type: string = "object"

properties

properties: object

file

file: object

type

type: string = "string"

position

position: object

$ref

$ref: string = "positionDef"

size

size: object

maximum

maximum: number = 500

minimum

minimum: number = 0

type

type: string = "number"

zip

zip: object

type

type: string = "string"

Const UploadParamsSchema

UploadParamsSchema: object

$schema

$schema: string = "http://json-schema.org/draft-07/schema#"

additionalProperties

additionalProperties: boolean = false

description

description: string = "Filestack Upload Options"

title

title: string = "Filestack Upload"

type

type: string = "object"

properties

properties: object

concurrency

concurrency: object

maximum

maximum: number = 20

minimum

minimum: number = 1

type

type: string = "integer"

intelligent

intelligent: object

oneOf

oneOf: (object | object)[] = [{type: 'boolean',}, {type: 'string',enum: ['fallback'],}]

intelligentChunkSize

intelligentChunkSize: object

type

type: string = "integer"

onProgress

onProgress: object

format

format: string = "callback"

onRetry

onRetry: object

format

format: string = "callback"

partSize

partSize: object

minimum

minimum: number = 5 * 1024 * 1024

type

type: string = "integer"

progressInterval

progressInterval: object

minimum

minimum: number = 1

type

type: string = "integer"

retry

retry: object

maximum

maximum: number = 20

minimum

minimum: number = 0

type

type: string = "integer"

retryFactor

retryFactor: object

type

type: string = "integer"

retryMaxTime

retryMaxTime: object

type

type: string = "integer"

timeout

timeout: object

maximum

maximum: number = 60 * 60 * 1000

minimum

minimum: number = 1

type

type: string = "integer"

Const config

config: object

urls

urls: object

cdnUrl

cdnUrl: string = "https://cdn.filestackcontent.com"

cloudApiUrl

cloudApiUrl: string = "https://cloud.filestackapi.com"

fileApiUrl

fileApiUrl: string = "https://www.filestackapi.com/api/file"

pickerUrl

pickerUrl: string = `https://static.filestackapi.com/picker/${PICKER_VERSION}/picker.js`

uploadApiUrl

uploadApiUrl: string = "https://upload.filestackapi.com"

Const defaultSession

defaultSession: object

apikey

apikey: string = "TEST_API_KEY"

urls

urls: object

cdnUrl

cdnUrl: string = "https://cdn.filestackcontent.com"

cloudApiUrl

cloudApiUrl: string = "https://cloud.filestackapi.com"

fileApiUrl

fileApiUrl: string = "https://www.filestackapi.com/api/file"

pickerUrl

pickerUrl: string = "https://static.filestackapi.com/picker/1.4.4/picker.js"

uploadApiUrl

uploadApiUrl: string = "https://upload.filestackapi.com"

Const testSecurity

testSecurity: object

policy

policy: string = "examplePolicy"

signature

signature: string = "exampleSignature"

Const testSession

testSession: object

apikey

apikey: string = testApiKey

urls

urls: object = sessionURls

Type declaration

  • cdnUrl: string
  • cloudApiUrl: string
  • fileApiUrl: string
  • pickerUrl: string
  • uploadApiUrl: string