Skip to main content

Uppy 1.11 β€” 1.13: Dark Mode, custom meta fields and Google Docs in Companion

Β· 3 min read

Releases 1.11 through 1.13 introduced a bunch of major new features and bugfixes. Let's go through the main ones!

Dark mode​

A little while ago we’ve announced work in progress on Dark Mode for the Dashboard. We're happy to tell you it’s live now! You can try it out on the Dashboard example page.

There are three options available:

  • light β€” the default
  • dark
  • auto β€” will respect the user’s system settings and switch automatically
uppy.use(Dashboard, {
theme: 'dark',
});

Custom meta fields​

This is big one! Thanks to @galli-leo, you can now add custom fields to the Dashboard meta editor, such as <input type="tel">, <select> or <input type="checkbox">, like this:

uppy.use(Dashboard, {
trigger: '#pick-files',
metaFields: [
{
id: 'caption',
name: 'Caption',
placeholder: 'describe what the image is about',
},
{
id: 'public',
name: 'Public',
render: ({ value, onChange }, h) => {
return h('input', {
type: 'checkbox',
onChange: (ev) => onChange(ev.target.checked ? 'on' : 'off'),
defaultChecked: value === 'on',
});
},
},
],
});

See the docs and PR #2147 for details.

Google Docs support in Companion​

In the past, Uppy could already import files from Google Drive using Companion. However, files from Google Docs are not really files, and could not be imported. That was confusing for users: some of their files simply didn't appear!

Companion now automagically converts GSuite documents, such as docs, spreadsheets and presentations, to .docx, .xlsx and .ppt files that can be opened in various applications. The current list of conversions is hardcoded to:

{
"application/vnd.google-apps.document": ".docx",
"application/vnd.google-apps.drawing": ".png",
"application/vnd.google-apps.script": ".json",
"application/vnd.google-apps.spreadsheet": ".xlsx",
"application/vnd.google-apps.presentation": ".ppt"
}

This may be configurable in a future release.

Note that only documents under 10MB are converted. This is a limitation set by the Google Drive API.

AWS S3​

The Aws S3 plugin now handles uploads internally, instead of deferring to XHR Upload. This change fixes many bugs with Aws S3. See PR #2060 for details.

Locales​

Polish, Croatian and Romanian language packs have been added by @alfatv, @dkisic and @akizor πŸŽ‰

Exifr in Thumbnail Generator​

@MikeKovarik created an awesome library called Exifr, useful for extracting EXIF image data. He was kind enough to submit a PR that replaces Uppy’s internal fork of exif-js with exifr. Our thumbnail generation is now faster and more robust! See PR 2140 for details.

Misc​

  • @uppy/tus, @uppy/xhr-upload: emit error when companion returns error during upload creation (#2166 / @ifedapoolarewaju)
  • @uppy/transloadit: fix progress with very different Assembly runtimes (#2143 / @agreene-coursera)
  • @uppy/core: Only _startIfAutoProceed if some files were actually added (#2146 / @arturi)
  • @uppy/companion: emit error to client if download fails (#2139 / @ifedapoolarewaju)
  • @uppy/companion: validate all client provided upload data. (#2160 / @ifedapoolarewaju)
  • @uppy/dashboard: Log warning instead of an error when trigger is not found (#2144 / @arturi)
  • @uppy/robodog: Pass hideUploadButton to Dashboard in Robodog too (#2169 / @arturi)
  • @uppy/aws-s3-multipart: emit upload-error when companion returns error during upload instantiation (#2168 / @ifedapoolarewaju)

As always, you can find the full list of changes and package versions, as well as future plans, in our changelog.