github

transloadit / uppy

  • вторник, 19 июля 2016 г. в 03:13:00
https://github.com/transloadit/uppy

JavaScript
🐶 The next open source file uploader for web browsers — a work in progress



Uppy

Uppy logo — a puppy superman

Build Status Sauce Test Status

Uppy is (going to be) a cool JavaScript file uploader that fetches files for you from local disk, Google Drive, Dropbox, Instagram, remote URLs, cameras and other exciting locations, and then uploads them to wherever you want. Uppy is being developed by the Transloadit team because we want file uploading experience to be better — both for users and developers.

Check out uppy.io for docs, API, examples and stats.

Features

  • Lightweight / easy on dependencies
  • Usable as a bundle straight from a CDN as well as a module to import
  • Resumable file uploads via the open tus standard
  • Uppy speaks multiple languages (i18n support)
  • Works great with file encoding and processing backends, such as Transloadit
  • Small core, modular plugin-based architecture.
  • Cute as a puppy 🐶, also accepts cat pictures

Demo

Uppy UI Demo: modal dialog with a few selected files and an upload button

Usage

⚠️Don’t use Uppy in production just yet, we’re working on it

It’s easy to start using Uppy, we recommend installing from npm with npm install uppy and then:

import Uppy from 'uppy/core'
import { DragDrop, Tus10 } from 'uppy/plugins'

const uppy = new Uppy({wait: false})
const files = uppy
  .use(DragDrop, {target: '#upload-target'})
  .use(Tus10, {endpoint: 'http://master.tus.io:8080/files/'})
  .run()

But if you like, you can also use a pre-built bundle, in that case Uppy will attach itself to the global window object:

<script src="uppy.min.js"></script>
<script>
var uppy = new Uppy.Core({locales: Uppy.locales.ru_RU, debug: true});
  uppy.use(Uppy.plugins.DragDrop, {target: '.UppyDragDrop'});
  uppy.use(Uppy.plugins.Tus10, {endpoint: 'http://master.tus.io:3020/files/'});
  uppy.run();
</script>

Browser Support

Sauce Test Status

Contributions are welcome

License

The MIT License.