Options
All
  • Public
  • Public/Protected
  • All
Menu

Class for handling filelinks. For now its supports all filestack transforms. It outputs transform url or array of transforms

example

const link = new Filelink('handle or externalUrl', 'apikey'); link.flip().flop().store();

console.log(link.toString()); // enable base64 support link.setBase64(true)

console.log(link.toString());

export
class

Filelink

Hierarchy

  • Filelink

Index

Constructors

constructor

  • new Filelink(source: string | string[], apikey?: string): Filelink
  • Class for generating tranformation urls

    memberof

    Filelink

    Parameters

    • source: string | string[]

      handle or multiple handles (i.e. for collage)

    • Optional apikey: string

    Returns Filelink

Methods

PDFConvert

PDFInfo

URLScreenshot

addTask

  • addTask(name: string, params?: any): this
  • Add task and validate

    memberof

    Filelink

    Parameters

    • name: string
    • Optional params: any

    Returns this

ascii

blackwhite

blur

blurFaces

border

cache

circle

collage

crop

cropFaces

detectFaces

enhance

  • enhance(): this

fallback

flip

  • flip(): this

flop

  • flop(): this

getTransformations

  • getTransformations(): any[]
  • Returns transformations in JSON format

    memberof

    Filelink

    Returns any[]

getValidationSchema

  • getValidationSchema(): object
  • Returns JSONSchema form transformations params

    memberof

    Filelink

    Returns object

    • $schema: string
    • additionalProperties: boolean
    • description: string
    • title: string
    • type: string
    • properties: object
      • ascii: object
        • oneOf: (object | object)[]
      • blackwhite: object
        • oneOf: (object | object)[]
      • blur: object
        • oneOf: (object | object)[]
      • blur_faces: object
        • oneOf: (object | object)[]
      • border: object
        • oneOf: (object | object)[]
      • cache: object
        • oneOf: (object | object)[]
      • circle: object
        • oneOf: (object | object)[]
      • collage: object
        • additionalProperties: boolean
        • required: string[]
        • type: string
        • properties: object
          • autorotate: object
            • default: boolean
            • type: string
          • color: object
            • $ref: string
            • default: string
          • files: object
            • items: object[]
            • minItems: number
            • type: string
          • fit: object
            • enum: string[]
            • type: string
          • height: object
            • maximum: number
            • minimum: number
            • type: string
          • margin: object
            • default: number
            • maximum: number
            • minimum: number
            • type: string
          • width: object
            • maximum: number
            • minimum: number
            • type: string
      • compress: object
        • additionalProperties: boolean
        • oneOf: (object | object)[]
      • crop: object
        • required: string[]
        • type: string
        • properties: object
          • dim: object
            • additionalItems: boolean
            • items: object[]
            • minItems: number
            • type: string
      • crop_faces: object
        • oneOf: (object | object)[]
      • detect_faces: object
        • oneOf: (object | object)[]
      • enhance: object
        • additionalProperties: boolean
        • type: string
      • fallback: object
        • additionalProperties: boolean
        • required: string[]
        • type: string
        • properties: object
          • cache: object
            • maximum: number
            • minimum: number
            • type: string
          • handle: object
            • type: string
      • flip: object
        • additionalProperties: boolean
        • type: string
      • flop: object
        • additionalProperties: boolean
        • type: string
      • imagesize: object
        • additionalProperties: boolean
        • type: string
      • metadata: object
        • additionalProperties: boolean
        • type: string
        • params: object
          • additionalItems: boolean
          • minItems: number
          • type: string
          • uniqueItems: boolean
          • items: object
            • enum: string[]
            • type: string
      • minify_css: object
        • additionalProperties: boolean
        • type: string
        • properties: object
          • gzip: object
            • type: string
          • level: object
            • enum: number[]
            • type: string
      • minify_js: object
        • additionalProperties: boolean
        • type: string
        • properties: object
          • gzip: object
            • type: string
          • keep_class_name: object
            • type: string
          • keep_fn_name: object
            • type: string
          • mangle: object
            • type: string
          • merge_vars: object
            • type: string
          • remove_console: object
            • type: string
          • remove_undefined: object
            • type: string
          • targets: object
            • type: string
          • use_babel_polyfill: object
            • type: string
      • modulate: object
        • oneOf: (object | object)[]
      • monochrome: object
        • additionalProperties: boolean
        • type: string
      • negative: object
        • additionalProperties: boolean
        • type: string
      • no_metadata: object
        • additionalProperties: boolean
        • type: string
      • oil_paint: object
        • oneOf: (object | object)[]
      • output: object
        • additionalProperties: boolean
        • type: string
        • properties: object
          • background: object
            • $ref: string
          • colorspace: object
            • default: string
            • enum: string[]
            • type: string
          • compress: object
            • type: string
          • density: object
            • maximum: number
            • minimum: number
            • type: string
          • docinfo: object
            • default: boolean
            • type: string
          • format: object
            • enum: string[]
            • type: string
          • page: object
            • maximum: number
            • minimum: number
            • type: string
          • pageformat: object
            • enum: string[]
            • type: string
          • pageorientation: object
            • enum: string[]
            • type: string
          • quality: object
            • oneOf: (object | object)[]
          • secure: object
            • default: boolean
            • type: string
          • strip: object
            • default: boolean
            • type: string
      • partial_blur: object
        • required: string[]
        • type: string
        • properties: object
          • amount: object
            • maximum: number
            • minimum: number
            • type: string
          • blur: object
            • maximum: number
            • minimum: number
            • type: string
          • objects: object
            • $ref: string
          • type: object
            • enum: string[]
            • type: string
      • partial_pixelate: object
        • required: string[]
        • type: string
        • properties: object
          • amount: object
            • maximum: number
            • minimum: number
            • type: string
          • blur: object
            • maximum: number
            • minimum: number
            • type: string
          • objects: object
            • $ref: string
          • type: object
            • enum: string[]
            • type: string
      • pdfconvert: object
        • additionalProperties: boolean
        • anyOf: object[]
        • type: string
        • properties: object
          • pageformat: object
            • $ref: string
          • pageorientation: object
            • enum: string[]
            • type: string
          • pages: object
            • $ref: string
      • pdfinfo: object
        • oneOf: (object | object)[]
      • pixelate: object
        • oneOf: (object | object)[]
      • pixelate_faces: object
        • oneOf: (object | object)[]
      • pjpg: object
        • oneOf: (object | object)[]
      • polaroid: object
        • oneOf: (object | object)[]
      • quality: object
        • additionalProperties: boolean
        • type: string
        • properties: object
          • value: object
            • maximum: number
            • minimum: number
            • type: string
      • redeye: object
        • additionalProperties: boolean
        • type: string
      • resize: object
        • additionalProperties: boolean
        • anyOf: object[]
        • type: string
        • properties: object
          • align: object
            • $ref: string
            • default: string
          • fit: object
            • default: string
            • enum: string[]
            • type: string
          • height: object
            • maximum: number
            • minimum: number
            • type: string
          • width: object
            • maximum: number
            • minimum: number
            • type: string
      • rotate: object
        • additionalProperties: boolean
        • type: string
        • properties: object
          • background: object
            • $ref: string
            • default: string
          • deg: object
            • oneOf: (object | object)[]
          • exif: object
            • type: string
      • rounded_corners: object
        • oneOf: (object | object)[]
      • security: object
        • additionalProperties: boolean
        • required: string[]
        • type: string
        • properties: object
          • policy: object
            • type: string
          • signature: object
            • type: string
      • sepia: object
        • oneOf: (object | object)[]
      • sfw: object
        • additionalProperties: boolean
        • type: string
      • shadow: object
        • oneOf: (object | object)[]
      • sharpen: object
        • oneOf: (object | object)[]
      • store: object
        • oneOf: (object | object)[]
      • tags: object
        • additionalProperties: boolean
        • type: string
      • torn_edges: object
        • oneOf: (object | object)[]
      • upscale: object
        • oneOf: (object | object)[]
      • urlscreenshot: object
        • oneOf: (object | object)[]
      • video_convert: object
        • additionalProperties: boolean
        • type: string
        • properties: object
          • access: object
            • default: string
            • enum: string[]
            • type: string
          • aspect_mode: object
            • default: string
            • enum: string[]
            • type: string
          • audio_bitrate: object
            • maximum: number
            • minimum: number
            • type: string
          • audio_channels: object
            • maximum: number
            • minimum: number
            • type: string
          • audio_sample_rate: object
            • maximum: number
            • minimum: number
            • type: string
          • clip_length: object
            • pattern: string
            • type: string
          • clip_offset: object
            • pattern: string
            • type: string
          • container: object
            • type: string
          • extname: object
            • type: string
          • filename: object
            • type: string
          • force: object
            • type: string
          • fps: object
            • maximum: number
            • minimum: number
            • type: string
          • frame_count: object
            • default: number
            • maximum: number
            • minimum: number
            • type: string
          • height: object
            • maximum: number
            • minimum: number
            • type: string
          • keyframe_interval: object
            • maximum: number
            • minimum: number
            • type: string
          • location: object
            • $ref: string
          • path: object
            • type: string
          • preset: object
            • type: string
          • title: object
            • type: string
          • two_pass: object
            • type: string
          • upscale: object
            • type: string
          • video_bitrate: object
            • maximum: number
            • minimum: number
            • type: string
          • watermark_bottom: object
            • maximum: number
            • minimum: number
            • type: string
          • watermark_left: object
            • maximum: number
            • minimum: number
            • type: string
          • watermark_right: object
            • maximum: number
            • minimum: number
            • type: string
          • watermark_top: object
            • maximum: number
            • minimum: number
            • type: string
          • watermark_url: object
            • type: string
          • width: object
            • maximum: number
            • minimum: number
            • type: string
      • vignette: object
        • oneOf: (object | object)[]
      • watermark: object
        • additionalProperties: boolean
        • required: string[]
        • type: string
        • properties: object
          • file: object
            • type: string
          • position: object
            • $ref: string
          • size: object
            • maximum: number
            • minimum: number
            • type: string
      • zip: object
        • type: string

minifyCss

minifyJs

  • Add task which minify a javascript file. For better handling of 'targets' param, use with b64 flag enabled.

    memberof

    Filelink

    Parameters

    Returns this

    this

modulate

monochrome

  • monochrome(): this

negative

  • negative(): this

oilPaint

output

partialBlur

partialPixelate

pixelate

pixelateFaces

polaroid

quality

redeye

  • redeye(): this

reset

  • reset(): this
  • Cleanup transformations on filelink

    memberof

    Filelink

    Returns this

resize

rotate

roundedCorners

security

sepia

setBase64

  • setBase64(flag: boolean): this
  • Enable new base64 link support to avoid problems with special chars in link

    memberof

    Filelink

    Parameters

    • flag: boolean

    Returns this

setCname

  • setCname(cname: string): this
  • Set cname for transformation link

    memberof

    Filelink

    Parameters

    • cname: string

    Returns this

setCustomDomain

  • setCustomDomain(domain: string): this
  • Set custom domain. Used for test purpose. It will be removed when after client.transform

    memberof

    Filelink

    Parameters

    • domain: string

    Returns this

setUseValidator

  • setUseValidator(flag: boolean): this
  • Switch the useValidator flag

    memberof

    Filelink

    Parameters

    • flag: boolean

    Returns this

sfw

  • sfw(): this

shadow

sharpen

store

tags

  • tags(): this

toString

  • toString(): string

tornEdges

upscale

videoConvert

vignette

zip

  • zip(): this