What is @uppy/core?
@uppy/core is a modular JavaScript file uploader that integrates with various file sources and provides a highly customizable and extensible API for handling file uploads.
What are @uppy/core's main functionalities?
File Selection
This feature allows users to select files from their local system using a customizable dashboard interface.
const Uppy = require('@uppy/core');
const Dashboard = require('@uppy/dashboard');
const uppy = Uppy();
uppy.use(Dashboard, {
inline: true,
target: 'body'
});
File Upload
This feature enables the uploading of selected files to a specified endpoint using XHR (XMLHttpRequest).
const Uppy = require('@uppy/core');
const XHRUpload = require('@uppy/xhr-upload');
const uppy = Uppy();
uppy.use(XHRUpload, {
endpoint: 'https://my-upload-endpoint.com/upload'
});
uppy.upload().then((result) => {
console.log('Upload complete:', result);
});
Progress Tracking
This feature provides a progress bar to track the upload progress of files.
const Uppy = require('@uppy/core');
const ProgressBar = require('@uppy/progress-bar');
const uppy = Uppy();
uppy.use(ProgressBar, {
target: 'body',
hideAfterFinish: false
});
File Validation
This feature allows for custom validation of files before they are uploaded, such as checking file size or type.
const Uppy = require('@uppy/core');
const uppy = Uppy();
uppy.on('file-added', (file) => {
if (file.size > 1000000) { // 1MB
uppy.removeFile(file.id);
alert('File is too large!');
}
});
Other packages similar to @uppy/core
dropzone
Dropzone is a popular JavaScript library that provides drag-and-drop file uploads with image previews. It is less modular than @uppy/core but offers a simpler setup for basic use cases.
fine-uploader
Fine Uploader is a comprehensive JavaScript library for file uploads that supports various features like chunking, retry, and concurrent uploads. It is more feature-rich but also more complex compared to @uppy/core.
plupload
Plupload is a JavaScript library that handles file uploads with support for multiple runtimes (HTML5, Flash, Silverlight, etc.). It is similar in functionality to @uppy/core but may require more configuration for advanced use cases.
@uppy/core
Uppy is a sleek, modular JavaScript file uploader that integrates seamlessly
with any application. It’s fast, provides a comprehensible API and lets you
worry about more important problems than building a file uploader.
- Fetch files from local disk, remote urls, Google Drive, Dropbox,
Instagram, or snap and record selfies with a camera;
- Preview and edit metadata with a nice interface;
- Upload to the final destination, optionally process/encode
Read the docs |
Try Uppy
Uppy is being developed by the folks at Transloadit,
a versatile file encoding service.
Example
import Uppy from '@uppy/core'
const uppy = new Uppy()
uppy.use(SomePlugin)
Installation
$ npm install @uppy/core
Alternatively, you can also use this plugin in a pre-built bundle from
Transloadit’s CDN: Edgly. In that case Uppy
will attach itself to the global
window.Uppy
object. See the
main Uppy documentation for instructions.
Documentation
Documentation for this plugin can be found on the
Uppy website.
License
The MIT License.
4.1.1
Released: 2024-08-15
| Package | Version | Package | Version |
| ---------------------- | ------- | ---------------------- | ------- |
| @uppy/aws-s3 | 4.0.3 | @uppy/provider-views | 4.0.1 |
| @uppy/companion | 5.0.5 | @uppy/status-bar | 4.0.2 |
| @uppy/companion-client | 4.0.1 | @uppy/transloadit | 4.0.2 |
| @uppy/core | 4.1.1 | @uppy/tus | 4.0.1 |
| @uppy/dashboard | 4.0.3 | @uppy/utils | 6.0.2 |
| @uppy/drag-drop | 4.0.2 | @uppy/vue | 2.0.1 |
| @uppy/file-input | 4.0.1 | uppy | 4.1.1 |
| @uppy/image-editor | 3.0.1 | | |
- @uppy/transloadit: fix issue with
allowMultipleUploadBatches
(Mikael Finstad / #5400) - meta: Bump elliptic from 6.5.5 to 6.5.7 (dependabot[bot] / #5410)
- meta: add back patch for
p-queue
(Antoine du Hamel / #5409) - @uppy/transloadit: fix many lurking
TypeError
(Mikael Finstad / #5399) - docs: improve
corsOrigins
documentation (Mikael Finstad / #5390) - docs: add
ViewEncapsulation
to Angular example (Aaron Russell / #5395) - @uppy/companion: fix code for custom providers (Mikael Finstad / #5398)
- docs: add note about throwing in
cancelAll
and destroy()
(Mikael Finstad / #5408) - meta: Bump docker/login-action from 3.2.0 to 3.3.0 (dependabot[bot] / #5372)
- meta: Bump docker/setup-qemu-action from 3.1.0 to 3.2.0 (dependabot[bot] / #5370)
- docs: make hosted Companion more clear (Merlijn Vos / #5394)
- meta: Bump docker/build-push-action from 6.4.1 to 6.6.1 (dependabot[bot] / #5403)
- meta: bump p-queue to latest, remove patch (Mikael Finstad / #5391)
- meta: enforce
.ts
extension for relative import types (Antoine du Hamel / #5393) - @uppy/tus: Fix onShouldRetry type signature (Trent Nadeau / #5387)
- @uppy/dashboard,@uppy/drag-drop,@uppy/file-input: Transform the
accept
prop into a string everywhere (Evgenia Karunus / #5380) - docs: fix getTemporarySecurityCredentials in aws-s3 (Merlijn Vos / #5363)