New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

filerobot-uploader

Package Overview
Dependencies
Maintainers
1
Versions
124
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

filerobot-uploader

Fully customisable Uploader

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-83.33%
Maintainers
1
Weekly downloads
 
Created
Source

Filerobot Uploader

Plugin to upload images.

Table of contents

  • Standalone usage
  • React component usage
  • Configuration
  • Callbacks
  • Contributing

Standalone usage

Installation

Use latest CDNized plugin version

<script src="https://js.filerobot.com/airstore-uploader.last.js"></script>

Quick start

We provide easy way to integrate image uploader in your applications

<script>
  let options = {
    container: 'example',
    filerobotUploadKey: '0cbe9ccc4f164bf8be26bd801d53b132',
    openpixKey: 'xxxxxxxxxxxxxxx',
    onUpload: (files) => {
        console.log('files: ', files);
        alert('Files uploaded successfully! check the console to see the uploaded files');
    }
  };

  let uploader = FilerobotUploader.init(options);

  uploader.open();
</script>

Methods

window.FilerobotUploader.init(options: {}): function

Initialization of Filerobot Uploader plugin.

window.FilerobotUploader.open(tab : string, options: {}): function

Open uploader modal.

  • tab: string (optional, default: 'UPLOAD') - allow to choose the initial tab (should be one of enabled modules)

  • options: {} (optional) - options for tabs

window.FilerobotUploader.close(): function

Close uploader modal.

window.FilerobotUploader.unmount(): function

Destroy uploader

React component

in progress

Configuration

container: string (required)

Filerobot Container name.

let options = {
    ...,

    container: 'example'
};
filerobotUploadKey: string (required)

Unique upload key for Filerobot.

let options = {
    ...,

    filerobotUploadKey: 'xxxxxxxxxxxx'
};
openpixKey: string (required)

Key for Openpix. Required if you are using "ICONS_GALLERY", "IMAGES_GALLERY"

let options = {
    ...,

    openpixKey: 'xxxxxxxxxxxx'
};
language: string

default: 'en'

Language of uploader

available languages: en, fr, de, ru

let options = {
    ...,

    language: 'en'
};
modules: string[]

default: ["UPLOAD", "MY_GALLERY", "ICONS_GALLERY", "IMAGES_GALLERY"]

Modules (tabs) in file uploader modal.

Available modules: UPLOAD, MY_GALLERY, ICONS_GALLERY, IMAGES_GALLERY, TAGGING

let options = {
    ...,

    modules: ['UPLOAD', 'ICONS_GALLERY', 'TAGGING']
};
uploadParams: object

see documentation

  • dir: string (default: '/') - specify the folder where you want to upload the file. If the folder doesn't exist, it will be created.
let options = {
    ...,

    uploadParams: {
        dir: '/folder_name',
        ...
    }
};
initialTab: string

default: 'UPLOAD'

Allow to choose the initial tab. Should be one of enabled modules.

let options = {
    ...,

    initialTab: 'UPLOAD'
};
folderBrowser: bool

default: true

Aside menu to browse folders in your container.

let options = {
    ...,

    folderBrowser: true
};
tagging: object
  • key: string (require) - key to use image recognition technology

  • autoTaggingButton: bool - adds button which will automatically generate tags based on image recognition technology

  • provider: string [google|imagga] - recognition provider

  • confidence: number [0..100] - confidence of recognition

  • limit: number - limit of tags generated by image recognition technology

let options = {
    ...,

    tagging: {
        autoTaggingButton: true,
        provider: 'google',
        confidence: 60,
        limit: 10,
        key: 'xxxxx'
    }
};

Callbacks

onUpload(files: file[]): function (required)

Function to handle uploaded files.

let options = {
    ...,

    onUpload: (files) => {
        // do something
    }
};

Contributing!

All contributions are super welcome!

Keywords

FAQs

Package last updated on 20 Feb 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc