All Projects → filestack → Filestack Js

filestack / Filestack Js

Licence: mit
Official Javascript SDK for the Filestack API and content ingestion system.

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Filestack Js

Uploadcare Php
PHP API client that handles uploads and further operations with files by wrapping Uploadcare Upload and REST APIs.
Stars: ✭ 77 (-54.44%)
Mutual labels:  image-processing, file-upload, uploader
uploadcare client
A flutter library for working with Uploadcare REST API. File uploads, media processing, and adaptive delivery for web and mobile.
Stars: ✭ 14 (-91.72%)
Mutual labels:  file-upload, uploader
lolisafe
Blazing fast file uploader and awesome bunker written in node! 🚀
Stars: ✭ 181 (+7.1%)
Mutual labels:  file-upload, uploader
Dropit
DropIt is a File Uploader built with nodejs, Upload, get a link, and share your files with anyone easily.
Stars: ✭ 367 (+117.16%)
Mutual labels:  file-upload, uploader
V Uploader
A Vue2 plugin make files upload simple and easier, single file upload with image preview, multiple upload with drag and drop
Stars: ✭ 216 (+27.81%)
Mutual labels:  file-upload, uploader
react-native-tus-client
React Native client for the tus resumable upload protocol.
Stars: ✭ 38 (-77.51%)
Mutual labels:  file-upload, uploader
Vue File Upload
vue.js ,vue-loader 上传文件,vue-file-upload,vue上传文件组件
Stars: ✭ 317 (+87.57%)
Mutual labels:  file-upload, uploader
React Dropzone Uploader
React file dropzone and uploader
Stars: ✭ 276 (+63.31%)
Mutual labels:  file-upload, uploader
Angular File Uploader
Angular file uploader is an Angular 2/4/5/6/7/8/9/10 + file uploader module with Real-Time Progress Bar, Responsive design, Angular Universal Compatibility, localization and multiple themes which includes Drag and Drop and much more.
Stars: ✭ 92 (-45.56%)
Mutual labels:  file-upload, uploader
Tus Php
🚀 A pure PHP server and client for the tus resumable upload protocol v1.0.0
Stars: ✭ 1,048 (+520.12%)
Mutual labels:  file-upload, uploader
Uploadcare Widget
Uploadcare Widget, an ultimate tool for HTML5 file upload supporting multiple file upload, drag&drop, validation by file size/file extension/MIME file type, progress bar for file uploads, image preview.
Stars: ✭ 183 (+8.28%)
Mutual labels:  file-upload, uploader
Filepond
🌊 A flexible and fun JavaScript file upload library
Stars: ✭ 11,869 (+6923.08%)
Mutual labels:  image-processing, file-upload
Sharex Upload Server
AKA ShareS - Feature full & Stable ShareX and file server in node. Includes images, videos, code, text, markdown rendering, password protected uploads, logging via discord, administration through Discord, url shortening, and a full front end. Use standalone or via reverse proxy
Stars: ✭ 180 (+6.51%)
Mutual labels:  file-upload, uploader
ajax
Just another AJAX requests helper
Stars: ✭ 27 (-84.02%)
Mutual labels:  file-upload, uploader
Chibisafe
Blazing fast file uploader and awesome bunker written in node! 🚀
Stars: ✭ 657 (+288.76%)
Mutual labels:  file-upload, uploader
Uppload
📁 JavaScript image uploader and editor, no backend required
Stars: ✭ 1,673 (+889.94%)
Mutual labels:  file-upload, uploader
Filestack Android
Official Android SDK for Filestack - API and content management system that makes it easy to add powerful file uploading and transformation capabilities to any web or mobile application.
Stars: ✭ 140 (-17.16%)
Mutual labels:  image-processing, file-upload
Low Light Image Enhancement Resources
This is a resouce list for low light image enhancement
Stars: ✭ 155 (-8.28%)
Mutual labels:  image-processing
Pdftabextract
A set of tools for extracting tables from PDF files helping to do data mining on (OCR-processed) scanned documents.
Stars: ✭ 1,969 (+1065.09%)
Mutual labels:  image-processing
Degate
Open source software for chip reverse engineering.
Stars: ✭ 156 (-7.69%)
Mutual labels:  image-processing

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>

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 additional polyfills to your page or application. (We are no longer support IE11 and older browser, so it can stop working on this browser)

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.

Error event

The upload.error event was added to sdk. To obtain every upload request error just add callback to it. Error contains details field with responseBody, responseHeaders, code (only when error type is FilestackErrorType.REQUEST)

<script>
  const client = filestack.init('apikey');
  client.on('upload.error', (filestackError) => {
    console.log(filestackError);
  });
</script>

Sentry Integration

If you're using Sentry to monitor your application, Filestack will automatically report upload errors to Sentry, and tag them with helpful diagnostic information via @sentry/minimal.

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].