uppy README

The project's README from github.com/transloadit/uppy. As one markdown file: README.md.

Uppy uppy on npm

Uppy logo: a smiling puppy above a pink upwards arrow

Uppy is a sleek, modular JavaScript file uploader that integrates seamlessly with any application. It’s fast, has a comprehensible API and lets you worry about more important problems than building a file uploader.

Read the docs | Try Uppy

Developed by Transloadit

Uppy is being developed by the folks at Transloadit, a versatile API to handle any file in your app.

TestsCI status for Uppy testsCI status for Companion tests
DeploysCI status for CDN deploymentCI status for Companion deploymentCI status for website deployment

Example

Code used in the above example:

import Uppy from '@uppy/core'
import Dashboard from '@uppy/dashboard'
import RemoteSources from '@uppy/remote-sources'
import ImageEditor from '@uppy/image-editor'
import Webcam from '@uppy/webcam'
import Tus from '@uppy/tus'

const uppy = new Uppy()
  .use(Dashboard, { trigger: '#select-files' })
  .use(RemoteSources, { companionUrl: 'https://companion.uppy.io' })
  .use(Webcam)
  .use(ImageEditor)
  .use(Tus, { endpoint: 'https://tusd.tusdemo.net/files/' })
  .on('complete', (result) => {
    console.log('Upload result:', result)
  })

Try it online or read the docs for more details on how to use Uppy and its plugins.

Integrations

Uppy has first-class support for plain JS/HTML, React, Svelte, Vue, and Angular.

For the supported frameworks (except Angular) Uppy offers three ways to build user interfaces:

  1. Pre-composed, plug-and-play components. Mainly <Dashboard />. The downside is that you can’t customize the UI.
  2. Headless components. Smaller components, easier to override the styles or compose them together with your own components.
  3. Hooks. Attach our logic to your own components, no restrictions, create a tailor-made UI.

Features

Installation

npm install @uppy/core @uppy/dashboard @uppy/tus

Add CSS uppy.min.css, either to your HTML page’s <head> or include in JS, if your bundler of choice supports it.

Alternatively, you can also use a pre-built bundle from Transloadit’s CDN: Smart CDN. In that case Uppy will attach itself to the global window.Uppy object.

⚠️ The bundle consists of most Uppy plugins, so this method is not recommended for production, as your users will have to download all plugins when you are likely using only a few.

<!-- 1. Add CSS to `<head>` -->
<link
  href="https://releases.transloadit.com/uppy/v6.0.1/uppy.min.css"
  rel="stylesheet"
/>

<!-- 2. Initialize -->
<div id="files-drag-drop"></div>
<script type="module">
  import {
    Uppy,
    Dashboard,
    Tus,
  } from 'https://releases.transloadit.com/uppy/v6.0.1/uppy.min.mjs'

  const uppy = new Uppy()
  uppy.use(Dashboard, { target: '#files-drag-drop' })
  uppy.use(Tus, { endpoint: 'https://tusd.tusdemo.net/files/' })
</script>

Documentation

Plugins

UI Elements

Sources

The ⓒ mark means that @uppy/companion, a server-side component, is needed for a plugin to work.

Destinations

File Processing

Miscellaneous

Browser Support

We aim to support recent versions of Chrome, Firefox, and Safari.

FAQ

Why not use <input type="file">?

Having no JavaScript beats having a lot of it, so that’s a fair question! Running an uploading & encoding business for ten years though we found that in cases, the file input leaves some to be desired:

Not all apps need all these features. An <input type="file"> is fine in many situations. But these were a few things that our customers hit / asked about enough to spark us to develop Uppy.

Why is all this goodness free?

Transloadit’s team is small and we have a shared ambition to make a living from open source. By giving away projects like tus.io and Uppy, we’re hoping to advance the state of the art, make life a tiny little bit better for everyone and in doing so have rewarding jobs and get some eyes on our commercial service: a content ingestion & processing platform.

Our thinking is that if only a fraction of our open source userbase can see the appeal of hosted versions straight from the source, that could already be enough to sustain our work. So far this is working out! We’re able to dedicate 80% of our time to open source and haven’t gone bankrupt yet. :D

Does Uppy support S3 uploads?

Yes, please check out the docs for more information.

Can I use Uppy with Rails/Node.js/Go/PHP?

Yes, whatever you want on the backend will work with @uppy/xhr-upload plugin, since it only does a POST or PUT request. Here’s a PHP backend example.

If you want resumability with the Tus plugin, use one of the tus server implementations 👌🏼

And you’ll need @uppy/companion if you’d like your users to be able to pick files from Google Drive, Dropbox or via direct URLs (with more services coming).

Contributions are welcome

Used by

Uppy is used by: Photobox, Issuu, Law Insider, Cool Tabs, Soundoff, Scrumi, Crive and others.

Use Uppy in your project? Let us know!

Contributors

contributors table

License

The MIT License.

uppy (transloadit/uppy)

Searching Database…

31K ·GitHub
What is this?Uppy is a sleek, modular JavaScript file uploader for web browsers: it picks files from disk, webcam or cloud services, previews them and uploads to your backend, with optional processing afterwards.
Is Uppy a hosted service or something I add to my own code?It's an open source (MIT) JavaScript library you bundle into your app, built around a light plugin-based core. There's an optional server-side piece, @uppy/companion, for importing from cloud providers.
How do I add it to a project?Install the @uppy packages via npm/yarn with your bundler and include uppy.min.css, or drop in the pre-built CDN bundle that attaches to window.Uppy — the CDN bundle isn't recommended for production since it ships most plugins.
Do I need anything special on my server?No — @uppy/xhr-upload just sends a POST or PUT, so Rails, Node, Go, PHP or anything works. For resumable uploads run one of the tus server implementations; @uppy/companion is only needed for cloud imports.
Any browser caveats I should know about?It targets recent versions of Chrome, Firefox and Safari, so legacy browsers aren't the goal. Meta info can be edited and images cropped before upload, and i18n plus accessibility are built in.
Why would I use this instead of a plain file input?Uppy adds resumable uploads that survive network outages, browser crashes and accidental navigate-aways, accurate progress reporting, client-side validation of size/type/count, webcam capture, and picking files from Dropbox or a URL without downloading them to a mobile device first.
What does @uppy/companion do?It's a server-side component that lets Uppy import from Google Drive, Dropbox, Box, Facebook, OneDrive and direct URLs, syncing between servers so remote files go straight to the destination instead of passing through the user's device.
What is Golden Retriever?An optional Uppy plugin that restores files after a browser crash, so an upload in progress isn't lost. It complements the resumable tus uploads for large transfers.
Size
447.7 MB
Stars
31K
Age
10y
Commits · 90 Days