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

animate

ascii

autoImage

  • autoImage(): this

blackwhite

blur

blurFaces

border

cache

circle

collage

compress

crop

cropFaces

detectFaces

enhance

fallback

flip

  • flip(): this

flop

  • flop(): this

getTasks

  • getTasks(): any[]

getTransformations

  • getTransformations(): any[]

getValidationSchema

  • getValidationSchema(): { $schema: string; additionalProperties: boolean; description: string; title: string; type: string; properties: object }
  • Returns JSONSchema form transformations params

    memberof

    Filelink

    Returns { $schema: string; additionalProperties: boolean; description: string; title: string; type: string; properties: object }

    • $schema: string
    • additionalProperties: boolean
    • description: string
    • title: string
    • type: string
    • properties: object
      • animate: object
        • type: string
        • properties: object
          • align: object
            • $ref: string
            • default: string
          • background: object
            • $ref: string
            • default: string
          • delay: object
            • default: number
            • maximum: number
            • minimum: number
            • type: string
          • fit: object
            • default: string
            • enum: string[]
            • type: string
          • height: object
            • maximum: number
            • minimum: number
            • type: string
          • loop: object
            • default: number
            • maximum: number
            • minimum: number
            • type: string
          • width: object
            • maximum: number
            • minimum: number
            • type: string
      • ascii: object
        • oneOf: ({ type: string } | { additionalProperties: boolean; type: string; properties: object })[]
      • auto_image: object
        • additionalProperties: boolean
        • type: string
      • blackwhite: object
        • oneOf: ({ type: string } | { additionalProperties: boolean; type: string; properties: object })[]
      • blur: object
        • oneOf: ({ type: string } | { additionalProperties: boolean; type: string; properties: object })[]
      • blur_faces: object
        • oneOf: ({ type: string } | { additionalProperties: boolean; type: string; properties: object })[]
      • border: object
        • oneOf: ({ type: string } | { additionalProperties: boolean; type: string; properties: object })[]
      • cache: object
        • oneOf: ({ type: string } | { type: string; properties: object })[]
      • circle: object
        • oneOf: ({ type: string } | { additionalProperties: boolean; type: string; properties: 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: { type: string }[]
            • 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: ({ type: string } | { type: string; properties: object })[]
      • crop: object
        • required: string[]
        • type: string
        • properties: object
          • dim: object
            • additionalItems: boolean
            • items: { maximum: number; minimum: number; type: string }[]
            • minItems: number
            • type: string
      • crop_faces: object
        • oneOf: ({ type: string } | { additionalProperties: boolean; type: string; properties: object })[]
      • detect_faces: object
        • oneOf: ({ type: string } | { additionalProperties: boolean; type: string; properties: object })[]
      • enhance: object
        • default: boolean
        • oneOf: ({ type: string } | { additionalProperties: boolean; type: string; properties: object })[]
      • 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: ({ type: string } | { additionalProperties: boolean; type: string; properties: object })[]
      • monochrome: object
        • additionalProperties: boolean
        • type: string
      • negative: object
        • additionalProperties: boolean
        • type: string
      • no_metadata: object
        • additionalProperties: boolean
        • type: string
      • oil_paint: object
        • oneOf: ({ type: string } | { additionalProperties: boolean; type: string; properties: 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: ({ enum: string[]; type: string } | { default: number; maximum: number; minimum: number; type: string })[]
          • 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: { required: string[] }[]
        • type: string
        • properties: object
          • pageformat: object
            • $ref: string
          • pageorientation: object
            • enum: string[]
            • type: string
          • pages: object
            • $ref: string
      • pdfinfo: object
        • oneOf: ({ type: string } | { type: string; properties: object })[]
      • pixelate: object
        • oneOf: ({ type: string } | { additionalProperties: boolean; type: string; properties: object })[]
      • pixelate_faces: object
        • oneOf: ({ type: string } | { additionalProperties: boolean; type: string; properties: object })[]
      • pjpg: object
        • oneOf: ({ type: string } | { additionalProperties: boolean; type: string; properties: object })[]
      • polaroid: object
        • oneOf: ({ type: string } | { additionalProperties: boolean; type: string; properties: 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: { required: string[] }[]
        • 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: ({ enum: string[]; type: string } | { maximum: number; minimum: number; type: string })[]
          • exif: object
            • type: string
      • rounded_corners: object
        • oneOf: ({ type: string } | { additionalProperties: boolean; type: string; properties: object })[]
      • security: object
        • additionalProperties: boolean
        • required: string[]
        • type: string
        • properties: object
          • policy: object
            • type: string
          • signature: object
            • type: string
      • sepia: object
        • oneOf: ({ type: string } | { additionalProperties: boolean; type: string; properties: object })[]
      • sfw: object
        • additionalProperties: boolean
        • type: string
      • shadow: object
        • oneOf: ({ type: string } | { additionalProperties: boolean; type: string; properties: object })[]
      • sharpen: object
        • oneOf: ({ type: string } | { additionalProperties: boolean; type: string; properties: object })[]
      • store: object
        • oneOf: ({ type: string } | { additionalProperties: boolean; type: string; properties: object })[]
      • tags: object
        • additionalProperties: boolean
        • type: string
      • torn_edges: object
        • oneOf: ({ type: string } | { additionalProperties: boolean; type: string; properties: object })[]
      • upscale: object
        • oneOf: ({ type: string } | { additionalProperties: boolean; type: string; properties: object })[]
      • urlscreenshot: object
        • oneOf: ({ type: string } | { additionalProperties: boolean; type: string; properties: 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: ({ type: string } | { additionalProperties: boolean; type: string; properties: 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

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

setSource

  • setSource(source: string | string[]): void

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