Code used in the above example:
const SmeUploader =const Dashboard =const Tus =const uploader = autoProceed: false// use your tus endpoint here
- Lightweight and modular, plugin-based architecture, easy on dependencies.
- Uses no frameworks (such as ExtJS or Angular).
- On the back end, only a configurable binary executable listens on a port, and redirects the upload chunks to an AWS S3 bucket.
- Large uploads survive network hiccups thanks to resumable file uploads via the open tus standard.
- Sleek user interface.
- A user can pause an upload (for example, if they are about to go offline), and resume later.
- Works great with the file encoding and processing backend from Grafana, but also works great without.
- Speaks multiple languages (i18n).
- Built with accessibility in mind.
$ npm install @sme-uploader/core @sme-uploader/dashboard @sme-uploader/tus
Alternatively, you can also use a pre-built bundle from CDN. In that case
SmeUploader will attach itself to the global
⚠️ The bundle currently consists of most SME Uploader plugins, so this method is not recommended for production, as your users will have to download all plugins when you are likely using just a few.
<!-- 1. Add CSS to `<head>` --><!-- 2. Add JS before the closing `</body>` --><!-- 3. Initialize -->
- SME Uploader — full list of options, methods and events
- Plugins — list of SME Uploader plugins and their options
- Companion — setting up and running a Companion instance, which adds support for Instagram, Dropbox, Google Drive and remote URLs
Dashboard— universal UI with previews, progress bars, metadata editor and all the cool stuff. Required for most UI plugins like Webcam and Instagram
Progress Bar— minimal progress bar that fills itself when upload progresses
Status Bar— more detailed progress, pause/resume/cancel buttons, percentage, speed, uploaded/total sizes (included by default with
Informer— send notifications like “smile” before taking a selfie or “upload failed” when all is lost (also included by default with
Drag & Drop— plain and simple drag and drop area
File Input— even plainer “select files” button
Webcam— snap and record those selfies
Google Drive— import files from Google Drive
Dropbox— import files from Dropbox
OneDrive— import files from Microsoft OneDrive
Import From URL— import direct URLs from anywhere on the web
The ⓒ mark means that
@sme-uploader/companion, a server-side component, is needed for a plugin to work.
Tus— resumable uploads via the open tus standard
XHR Upload— regular uploads for any backend out there (like Apache, Nginx)
AWS S3— plain upload to AWS S3 or compatible services
AWS S3 Multipart— S3-style "Multipart" upload to AWS or compatible services
Robodog— user friendly abstraction to do file processing with Transloadit
Transloadit— support for Transloadit’s robust file uploading and encoding backend
Golden Retriever— restores files after a browser crash, like it’s nothing
Thumbnail Generator— generates image previews (included by default with
Form— collects metadata from
<form>right before an SME Uploader upload, then optionally appends results back to the form
Redux— for your emerging time traveling needs
We aim to support recent versions of Chrome, Firefox, Safari, Opera and Edge.
Why not just use
- We received complaints about broken uploads and found that resumable uploads are important, especially for big files and to be inclusive towards people on poorer connections (we also launched tus.io to attack that problem). SME Uploader uploads can survive network outages and browser crashes or accidental navigate-aways.
- SME Uploader supports editing meta information before uploading (and e.g. cropping is planned).
- There’s the situation where people are using their mobile devices and want to upload on the go, but they have their picture on Instagram, files in Dropbox or just a plain file URL from anywhere on the open web. SME Uploader allows to pick files from those and push it to the destination without downloading it to your mobile device first.
- Accurate upload progress reporting is an issue on many platforms.
- Some file validation — size, type, number of files — can be done on the client with SME Uploader.
- SME Uploader integrates webcam support, in case your users want to upload a picture/video/audio that does not exist yet.
- A larger drag and drop surface can be pleasant to work with. Some people also like that you can control the styling, language, etc.
- SME Uploader is aware of encoding backends. Often after an upload, the server needs to rotate, detect faces, optimize for iPad, or what have you. SME Uploader can track progress of this and report back to the user in different ways.
- Sometimes you might want your uploads to happen while you continue to interact on the same single page.
Not all apps need all of 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 SME Uploader.
Does SME Uploader support S3 uploads?
Yes, there is an S3 plugin, please check out the docs for more.
Do I need to install a special service/server for SME Uploader? Can I use it with Rails/Node/Go/PHP?
Yes, whatever you want on the backend will work with
@sme-uploader/xhr-upload plugin, since it just does a
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
@sme-uploader/companion if you’d like your users to be able to pick files from Instagram, Google Drive, Dropbox or via direct URLs (with more services coming).