From c7027643ff6411e6cbd02f0698f1832d94c35a2e Mon Sep 17 00:00:00 2001 From: Kevin van Zonneveld Date: Tue, 4 Feb 2020 15:15:36 +0100 Subject: [PATCH 01/24] Fix jsdoc warnings --- bin/upload-to-cdn.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/upload-to-cdn.js b/bin/upload-to-cdn.js index d2acf89884..70ccf95acf 100644 --- a/bin/upload-to-cdn.js +++ b/bin/upload-to-cdn.js @@ -41,10 +41,10 @@ const AWS_DIRECTORY = '756b8efaed084669b02cb99d4540d81f/default' /** * Get remote dist/ files by fetching the tarball for the given version - * from npm and filtering it down to package/dist/ files. +from npm and filtering it down to package/dist/ files. * - * @param {string} Package name, eg. @uppy/robodog - * @param {string} Package version, eg. "1.2.0" + * @param {string} packageName eg. @uppy/robodog + * @param {string} version eg. 1.8.0 * @returns a Map, filename → content */ async function getRemoteDistFiles (packageName, version) { @@ -74,7 +74,7 @@ async function getRemoteDistFiles (packageName, version) { * Get local dist/ files by asking npm-packlist what files would be added * to an npm package during publish, and filtering those down to just dist/ files. * - * @param {string} Base file path of the package, eg. ./packages/@uppy/locales + * @param {string} packagePath Base file path of the package, eg. ./packages/@uppy/locales * @returns a Map, filename → content */ async function getLocalDistFiles (packagePath) { From a032f96e85b1a7cffb2141e9abe83a4767b7343a Mon Sep 17 00:00:00 2001 From: ifedapoolarewaju Date: Wed, 5 Feb 2020 12:32:33 +0100 Subject: [PATCH 02/24] companion: return more accurate error status codes --- packages/@uppy/companion/src/companion.js | 4 ++ .../companion/src/server/controllers/get.js | 7 ++- .../companion/src/server/controllers/list.js | 8 +++- .../src/server/controllers/logout.js | 5 +++ .../src/server/provider/drive/index.js | 10 +++-- .../src/server/provider/dropbox/index.js | 10 +++-- .../companion/src/server/provider/error.js | 45 +++++++++++++++++-- .../src/server/provider/facebook/index.js | 12 +++-- .../server/provider/instagram/graph/index.js | 12 +++-- .../src/server/provider/instagram/index.js | 10 +++-- .../src/server/provider/onedrive/index.js | 10 +++-- 11 files changed, 108 insertions(+), 25 deletions(-) diff --git a/packages/@uppy/companion/src/companion.js b/packages/@uppy/companion/src/companion.js index 3c1ca672fb..c75caa30cb 100644 --- a/packages/@uppy/companion/src/companion.js +++ b/packages/@uppy/companion/src/companion.js @@ -18,6 +18,7 @@ const logger = require('./server/logger') const { STORAGE_PREFIX } = require('./server/Uploader') const middlewares = require('./server/middlewares') const { shortenToken } = require('./server/Uploader') +const { ProviderApiError, ProviderAuthError } = require('./server/provider/error') const defaultOptions = { server: { @@ -36,6 +37,9 @@ const defaultOptions = { debug: true } +// make the errors available publicly for custom providers +module.exports.errors = { ProviderApiError, ProviderAuthError } + /** * Entry point into initializing the Companion app. * diff --git a/packages/@uppy/companion/src/server/controllers/get.js b/packages/@uppy/companion/src/server/controllers/get.js index c6a93d77e7..2fecf32e4b 100644 --- a/packages/@uppy/companion/src/server/controllers/get.js +++ b/packages/@uppy/companion/src/server/controllers/get.js @@ -1,5 +1,6 @@ const Uploader = require('../Uploader') const logger = require('../logger') +const { errorToResponse } = require('../provider/error') function get (req, res, next) { const providerName = req.params.providerName @@ -10,7 +11,11 @@ function get (req, res, next) { // get the file size before proceeding provider.size({ id, token, query: req.query }, (err, size) => { if (err) { - return err.isAuthError ? res.sendStatus(401) : next(err) + const errResp = errorToResponse(err) + if (errResp) { + return res.status(errResp.code).json({ message: errResp.message }) + } + return next(err) } if (!size) { diff --git a/packages/@uppy/companion/src/server/controllers/list.js b/packages/@uppy/companion/src/server/controllers/list.js index c349414fe9..b0be993d28 100644 --- a/packages/@uppy/companion/src/server/controllers/list.js +++ b/packages/@uppy/companion/src/server/controllers/list.js @@ -1,10 +1,16 @@ +const { errorToResponse } = require('../provider/error') + function list ({ query, params, companion }, res, next) { const providerName = params.providerName const token = companion.providerTokens[providerName] companion.provider.list({ companion, token, directory: params.id, query }, (err, data) => { if (err) { - return err.isAuthError ? res.sendStatus(401) : next(err) + const errResp = errorToResponse(err) + if (errResp) { + return res.status(errResp.code).json({ message: errResp.message }) + } + return next(err) } return res.json(data) }) diff --git a/packages/@uppy/companion/src/server/controllers/logout.js b/packages/@uppy/companion/src/server/controllers/logout.js index 7016126127..9233688bbd 100644 --- a/packages/@uppy/companion/src/server/controllers/logout.js +++ b/packages/@uppy/companion/src/server/controllers/logout.js @@ -1,4 +1,5 @@ const tokenService = require('../helpers/jwt') +const { errorToResponse } = require('../provider/error') /** * @@ -17,6 +18,10 @@ function logout (req, res, next) { if (token) { req.companion.provider.logout({ token }, (err, data) => { if (err) { + const errResp = errorToResponse(err) + if (errResp) { + return res.status(errResp.code).json({ message: errResp.message }) + } return next(err) } diff --git a/packages/@uppy/companion/src/server/provider/drive/index.js b/packages/@uppy/companion/src/server/provider/drive/index.js index 98e6d777d7..c7c73c8662 100644 --- a/packages/@uppy/companion/src/server/provider/drive/index.js +++ b/packages/@uppy/companion/src/server/provider/drive/index.js @@ -5,12 +5,15 @@ const request = require('request') const purest = require('purest')({ request }) const logger = require('../../logger') const adapter = require('./adapter') -const AuthError = require('../error') +const { ProviderApiError, ProviderAuthError } = require('../error') const DRIVE_FILE_FIELDS = 'kind,id,name,mimeType,ownedByMe,permissions(role,emailAddress),size,modifiedTime,iconLink,thumbnailLink,teamDriveId' const DRIVE_FILES_FIELDS = `kind,nextPageToken,incompleteSearch,files(${DRIVE_FILE_FIELDS})` // using wildcard to get all 'drive' fields because specifying fields seems no to work for the /drives endpoint const SHARED_DRIVE_FIELDS = '*' +/** + * Adapter for API https://developers.google.com/drive/api/v3/ + */ class Drive extends Provider { constructor (options) { super(options) @@ -184,8 +187,9 @@ class Drive extends Provider { _error (err, resp) { if (resp) { - const errMsg = `request to ${this.authProvider} returned ${resp.statusCode}` - return resp.statusCode === 401 ? new AuthError() : new Error(errMsg) + const fallbackMessage = `request to ${this.authProvider} returned ${resp.statusCode}` + const errMsg = resp.body.error ? resp.body.error.message : fallbackMessage + return resp.statusCode === 401 ? new ProviderAuthError() : new ProviderApiError(errMsg, resp.statusCode) } return err } diff --git a/packages/@uppy/companion/src/server/provider/dropbox/index.js b/packages/@uppy/companion/src/server/provider/dropbox/index.js index 3fc117e773..99fba8a22c 100644 --- a/packages/@uppy/companion/src/server/provider/dropbox/index.js +++ b/packages/@uppy/companion/src/server/provider/dropbox/index.js @@ -4,7 +4,7 @@ const request = require('request') const purest = require('purest')({ request }) const logger = require('../../logger') const adapter = require('./adapter') -const AuthError = require('../error') +const { ProviderApiError, ProviderAuthError } = require('../error') // From https://www.dropbox.com/developers/reference/json-encoding: // @@ -19,6 +19,9 @@ function httpHeaderSafeJson (v) { ) } +/** + * Adapter for API https://www.dropbox.com/developers/documentation/http/documentation + */ class DropBox extends Provider { constructor (options) { super(options) @@ -202,8 +205,9 @@ class DropBox extends Provider { _error (err, resp) { if (resp) { - const errMsg = `request to ${this.authProvider} returned ${resp.statusCode}` - return resp.statusCode === 401 ? new AuthError() : new Error(errMsg) + const fallbackMessage = `request to ${this.authProvider} returned ${resp.statusCode}` + const errMsg = resp.body.error_summary ? resp.body.error_summary : fallbackMessage + return resp.statusCode === 401 ? new ProviderAuthError() : new ProviderApiError(errMsg, resp.statusCode) } return err diff --git a/packages/@uppy/companion/src/server/provider/error.js b/packages/@uppy/companion/src/server/provider/error.js index b818a39f4e..46035043bb 100644 --- a/packages/@uppy/companion/src/server/provider/error.js +++ b/packages/@uppy/companion/src/server/provider/error.js @@ -1,13 +1,52 @@ +/** + * ProviderApiError is error returned when an adapter encounters + * an http error while communication with its corresponding provider + */ +class ProviderApiError extends Error { + /** + * @param {string} message error message + * @param {number} statusCode the http status code from the provider api + */ + constructor (message, statusCode) { + super(message) + this.name = 'ProviderApiError' + this.statusCode = statusCode + this.isAuthError = false + } +} + /** * AuthError is error returned when an adapter encounters * an authorization error while communication with its corresponding provider */ -class AuthError extends Error { +class ProviderAuthError extends ProviderApiError { constructor () { - super('invalid access token detected by Provider') + super('invalid access token detected by Provider', 401) this.name = 'AuthError' this.isAuthError = true } } -module.exports = AuthError +/** + * Convert an error instance to an http response if possible + * @param {Error | ProviderApiError} err the error instance to convert to an http json response + */ +function errorToResponse (err) { + if (err instanceof ProviderAuthError && err.isAuthError) { + return { code: 401, message: err.message } + } + + if (err instanceof ProviderApiError) { + if (err.statusCode >= 500) { + // bad gateway i.e the provider APIs gateway + return { code: 502, message: err.message } + } + + if (err.statusCode >= 400) { + // 424 Failed Dependency + return { code: 424, message: err.message } + } + } +} + +module.exports = { ProviderAuthError, ProviderApiError, errorToResponse } diff --git a/packages/@uppy/companion/src/server/provider/facebook/index.js b/packages/@uppy/companion/src/server/provider/facebook/index.js index 1c34fc4459..26972d6db3 100644 --- a/packages/@uppy/companion/src/server/provider/facebook/index.js +++ b/packages/@uppy/companion/src/server/provider/facebook/index.js @@ -5,8 +5,11 @@ const purest = require('purest')({ request }) const utils = require('../../helpers/utils') const logger = require('../../logger') const adapter = require('./adapter') -const AuthError = require('../error') +const { ProviderApiError, ProviderAuthError } = require('../error') +/** + * Adapter for API https://developers.facebook.com/docs/graph-api/using-graph-api/ + */ class Facebook extends Provider { constructor (options) { super(options) @@ -153,11 +156,12 @@ class Facebook extends Provider { if (resp) { if (resp.body && resp.body.error.code === 190) { // Invalid OAuth 2.0 Access Token - return new AuthError() + return new ProviderAuthError() } - const msg = resp.body && resp.body.error ? resp.body.error.message : '' - return new Error(`request to ${this.authProvider} returned status: ${resp.statusCode}, message: ${msg}`) + const fallbackMessage = `request to ${this.authProvider} returned ${resp.statusCode}` + const msg = resp.body && resp.body.error ? resp.body.error.message : fallbackMessage + return new ProviderApiError(msg, resp.statusCode) } return err diff --git a/packages/@uppy/companion/src/server/provider/instagram/graph/index.js b/packages/@uppy/companion/src/server/provider/instagram/graph/index.js index 1bfe2734c8..34c5861d84 100644 --- a/packages/@uppy/companion/src/server/provider/instagram/graph/index.js +++ b/packages/@uppy/companion/src/server/provider/instagram/graph/index.js @@ -5,8 +5,11 @@ const purest = require('purest')({ request }) const utils = require('../../../helpers/utils') const logger = require('../../../logger') const adapter = require('./adapter') -const AuthError = require('../../error') +const { ProviderApiError, ProviderAuthError } = require('../../error') +/** + * Adapter for API https://developers.facebook.com/docs/instagram-api/overview + */ class Instagram extends Provider { constructor (options) { super(options) @@ -140,11 +143,12 @@ class Instagram extends Provider { if (resp) { if (resp.body && resp.body.error.code === 190) { // Invalid OAuth 2.0 Access Token - return new AuthError() + return new ProviderAuthError() } - const msg = resp.body && resp.body.error ? resp.body.error.message : '' - return new Error(`request to ${this.authProvider} returned status: ${resp.statusCode}, message: ${msg}`) + const fallbackMessage = `request to ${this.authProvider} returned ${resp.statusCode}` + const msg = resp.body && resp.body.error ? resp.body.error.message : fallbackMessage + return new ProviderApiError(msg, resp.statusCode) } return err diff --git a/packages/@uppy/companion/src/server/provider/instagram/index.js b/packages/@uppy/companion/src/server/provider/instagram/index.js index f155fbd5a7..cbb279e491 100644 --- a/packages/@uppy/companion/src/server/provider/instagram/index.js +++ b/packages/@uppy/companion/src/server/provider/instagram/index.js @@ -5,8 +5,11 @@ const purest = require('purest')({ request }) const utils = require('../../helpers/utils') const logger = require('../../logger') const adapter = require('./adapter') -const AuthError = require('../error') +const { ProviderApiError, ProviderAuthError } = require('../error') +/** + * Adapter for API https://www.instagram.com/developer/endpoints/ + */ class Instagram extends Provider { constructor (options) { super(options) @@ -139,10 +142,11 @@ class Instagram extends Provider { _error (err, resp) { if (resp) { if (resp.statusCode === 400 && resp.body && resp.body.meta.error_type === 'OAuthAccessTokenException') { - return new AuthError() + return new ProviderAuthError() } - return new Error(`request to ${this.authProvider} returned ${resp.statusCode}`) + const msg = `request to ${this.authProvider} returned ${resp.statusCode}` + return new ProviderApiError(msg, resp.statusCode) } return err diff --git a/packages/@uppy/companion/src/server/provider/onedrive/index.js b/packages/@uppy/companion/src/server/provider/onedrive/index.js index 216c11427a..8eebc89686 100644 --- a/packages/@uppy/companion/src/server/provider/onedrive/index.js +++ b/packages/@uppy/companion/src/server/provider/onedrive/index.js @@ -4,8 +4,11 @@ const request = require('request') const purest = require('purest')({ request }) const logger = require('../../logger') const adapter = require('./adapter') -const AuthError = require('../error') +const { ProviderApiError, ProviderAuthError } = require('../error') +/** + * Adapter for API https://docs.microsoft.com/en-us/onedrive/developer/rest-api/ + */ class OneDrive extends Provider { constructor (options) { super(options) @@ -126,8 +129,9 @@ class OneDrive extends Provider { _error (err, resp) { if (resp) { - const errMsg = `request to ${this.authProvider} returned ${resp.statusCode}` - return resp.statusCode === 401 ? new AuthError() : new Error(errMsg) + const fallbackMsg = `request to ${this.authProvider} returned ${resp.statusCode}` + const errMsg = resp.body.error ? resp.body.error.message : fallbackMsg + return resp.statusCode === 401 ? new ProviderAuthError() : new ProviderApiError(errMsg, resp.statusCode) } return err From 283dfb1d057c14919f8f4bc49aebe019b3aab75b Mon Sep 17 00:00:00 2001 From: Artur Paikin Date: Sat, 8 Feb 2020 15:55:22 +0300 Subject: [PATCH 03/24] plan future releases --- CHANGELOG.md | 59 +++++++++++++++++++++++++++++----------------------- 1 file changed, 33 insertions(+), 26 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 11b5d0f0f8..2b0bac803d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,21 +7,18 @@ Please add your entries in this format: - `- [ ] (|website|core|meta|build|test): \(\)`. -In the current stage we aim to release a new version on the -last Friday of every new month. +In the current stage we aim to release a new version at least every month. ## Backlog Ideas that will be planned and find their way into a release at one point. PRs are welcome! Please do open an issue to discuss first if it's a big feature, priorities may have changed after something was added here. -- [ ] build: utilize https://github.com/jonathantneal/postcss-preset-env, maybe https://github.com/jonathantneal/postcss-normalize (@arturi) - [ ] companion: Transfer files between providers (from instagram to Google drive for example). - [ ] companion: what happens if access token expires amid an upload/download process. - [ ] core: accessibility research: https://chrome.google.com/webstore/detail/accessibility-developer-t/fpkknkljclfencbdbgkenhalefipecmb, http://khan.github.io/tota11y/ - [ ] core: Add total max size to restrictions #514 - [ ] core: consider adding presets, see https://github.com/cssinjs/jss-preset-default/blob/master/src/index.js (@arturi) -- [ ] core: css-in-js, while keeping non-random classnames (ideally prefixed) and useful preprocessor features. also see simple https://github.com/codemirror/CodeMirror/blob/master/lib/codemirror.css (@arturi, @goto-bus-stop) - [ ] core: have a `resetProgress` method for resetting a single file, and call it before starting an upload. see comment in #393 - [ ] core: Make sure Uppy works well in VR - [ ] core: normalize file names when uploading from iOS? $678 @@ -31,29 +28,19 @@ PRs are welcome! Please do open an issue to discuss first if it's a big feature, - [ ] dashboard: Allow custom form fields in dashboard meta editing via jsx rendering (#617, #809, #454, @arturi) - [ ] dashboard: allow minimizing the Dashboard during upload (Uppy then becomes just a tiny progress indicator) (@arturi) - [ ] dashboard: Don't hide notifications if they're hovered (https://github.com/transloadit/uppy/issues/1439) -- [ ] dashboard: allow selecting folders (add separate hidden input button for folders) #447 #1027 - [ ] dashboard: Consider uploading image thumbnails too #1212 - [ ] dashboard: display data like image resolution on file cards #783 -- [ ] dashboard: hiding pause/resume from the UI by default (with option) would be good too probably (we could auto pause and show a resume button when detecting a network change to a metered network using https://devdocs.io/dom/networkinformation/type) - [ ] dashboard: possibility to edit/delete more than one file at once #118, #97 - [ ] dashboard: possibility to work on already uploaded / in progress files #112, #113 - [ ] dashboard: Show upload speed too if `showProgressDetails: true`. Maybe have separate options for which things are displayed, or at least have css-classes that can be hidden with `display: none` #766 -- [ ] dependencies: es6-promise --> lie https://github.com/calvinmetcalf/lie ? -- [ ] dragdrop: Add `directories-dropped` event #849 - [ ] dragdrop: allow customizing arrow icon https://github.com/transloadit/uppy/pull/374#issuecomment-334116208 (@arturi) - [ ] dragdrop: change border color when files doesn’t pass restrictions on drag https://github.com/transloadit/uppy/issues/607 - [ ] dragdrop: drag and drop + statusbar or progressbar ? (@arturi) -- [ ] goldenretriever: confirmation before restore, add “ghost” files #443 #257 (@arturi) -- [ ] google: show thumbnails when connecting with Google Drive #1162 (@ifedapoolarewaju) -- [ ] plugins: audio/memo recording similar to Webcam #143 -- [ ] plugins: Plugins - Keybase.io Remote provider plugin! #943 -- [ ] plugins: screenshot+screencast support similar to Webcam #148 +- [ ] plugins: Keybase.io Remote provider plugin! #943 - [ ] plugins: WordPress plugin https://www.producthunt.com/posts/uppy-io#comment-559327 (“And Gravity forms”) -- [ ] provider: Add Facebook, OneDrive, Box - [ ] provider: add sorting, filtering, previews #254 - [ ] provider: allow consuming developers to pass in their own ProviderViews to Provider Plugins https://github.com/transloadit/uppy/issues/1143 - [ ] provider: change ProviderViews signature to receive Provider instance in second param. (https://github.com/transloadit/uppy/pull/743#discussion_r180106070) -- [ ] provider: MediaLibrary provider which shows you files that have already been uploaded #450, #1121, #1112 - [ ] react: Component wrappers to manage the Uppy instance, many people initialize it in render() which does not work correctly so this could make it easier for them https://github.com/transloadit/uppy/pull/1247#issuecomment-458063951 - [ ] rn: Uppy React Native works with Expo, now let's make it work without - [ ] rn: Uppy React Native works with Url Plugin, now let's make it work with Instagram @@ -62,8 +49,6 @@ PRs are welcome! Please do open an issue to discuss first if it's a big feature, - [ ] test: Add a prepublish test that checks if `npm pack` is not massive - [ ] test: add deepFreeze to test that state in not mutated anywhere by accident #320 - [ ] test: add https://github.com/pa11y/pa11y for automated accessibility testing? -- [ ] test: add typescript with JSDoc (@arturi) https://github.com/Microsoft/TypeScript/wiki/Type-Checking-JavaScript-Files -- [ ] test: Human should test with real screen reader to identify accessibility problems - [ ] transloadit: consider adding option to append result link from transloadit to the link thing in the Dashboard file block #1177 - [ ] transloadit: maybe add option to disable Companion endpoint overrides - [ ] transloadit: option for StatusBar’s upload button to act as a "Start assembly" button? Useful if an assembly uses only import robots, such as /s3/import to start a batch transcoding job. @@ -71,9 +56,6 @@ PRs are welcome! Please do open an issue to discuss first if it's a big feature, - [ ] webcam: Pick format based on `restrictions.allowedFileTypes`, eg. use PNG for snapshot instead of JPG if `allowedFileTypes: ['.png']` is set - [ ] webcam: Specify the resolution of the webcam images. We should add a way to specify any custom constraints to the Webcam plugin #876 - [ ] webcam: Stop recording when file size is exceeded, should be possible given how the MediaRecorder API works -- [ ] webcam: UI or separate plugins for choosing between webcam audio-video/video-only/audio-only modes #198 -- [ ] webcam: Webcam modes #198 -- [ ] website: automatically generated page with all locale strings used in plugins - [ ] website: It would be nice in the long run to have a dynamic package builder here right on the website where you can select the plugins you need/want and it builds and downloads a minified version of them? Sort of like jQuery UI: https://jqueryui.com/download/ - [ ] Add an option to force metafield data when uploading a file #1703 - [ ] dashboard: Mark files with restriction errors in the UI. Having an icon showing close to the file to inform if it passed any rule would provide an awesome user experience. The user would be able to edit the file name or any meta tags necessary to pass validation via uppy dashboard, and anytime the user updates the file info, the validation runs again and the icon is updated. @@ -87,18 +69,46 @@ PRs are welcome! Please do open an issue to discuss first if it's a big feature, - [ ] xhr: change default name depending on wether `bundle` is set `files[]` (`true`) vs `file` (default) (#782) - [ ] xhr: set the `limit` option to a sensible default, like 10 - [ ] core: remove `debug`, we have `logger` and `logger: Uppy.debugLogger` for that now -- [ ] core: add 1st class Vue.js support -- [ ] core: add 1st class AngularJS support - [ ] form: make the `multipleResults` option `true` by default - [ ] core: pass full file object to `onBeforeFileAdded`. Maybe also check restrictions before calling the callbacks: https://github.com/transloadit/uppy/pull/1594 - [ ] tus: set the `limit` option to a sensible default, like 10 - [ ] core: consider removing Preact from `Plugin` (maybe have a `(ui)Plugin extends BasePlugin`?) as pointed out on Reddit https://www.reddit.com/r/javascript/comments/bhkx5k/uppy_10_your_best_friend_in_file_uploading/ - [ ] providers: remove `serverHeaders` https://github.com/transloadit/uppy/pull/1861 -- [ ] plugins: Transformations, cropping, filters for images, study https://github.com/MattKetmo/darkroomjs/, https://github.com/fengyuanchen/cropperjs #151 #53 - [ ] core: change the preprocessing --> uploading flow to allow for files to start uploading right away after their preprocessing step has finished. See #1738 (@goto-but-stop) - [ ] core: maybe we remove `file.name` and only keep `file.meta.name`; we can change the file.name here actually because it's just a plain object. we can't change the file.data.name where data is a File instance from an input or something. For XHRUpload, where we put the File instance in a FormData object and it uses the unchangeable .name property. - [ ] redux-store: make action signatures flux-standard-action compatible #1642 - [ ] locales: Remove the old es_GL name alias for gl_ES. Keep gl_ES only. +- [ ] dashboard: hiding pause/resume from the UI by default (with option) would be good too probably (we could auto pause and show a resume button when detecting a network change to a metered network using https://devdocs.io/dom/networkinformation/type) + +## 1.13 + +- [ ] provider: Image search (via Google or Bing or DuckDuckGo) (@arturi) +- [ ] core: add AngularJS wrapper component (@arturi) +- [ ] dashboard: allow selecting folders (add separate hidden input button for folders) #447 #1027 (@arturi) +- [ ] dashboard: Customizable meta editor for the Dashboard. Some people want maps, some to disable autocomplete, some validation. (See https://github.com/transloadit/uppy/issues/2007#issuecomment-573592859, https://github.com/transloadit/uppy/issues/809#issuecomment-417282743) +- [ ] provider: MediaLibrary provider which shows you files that have already been uploaded #450, #1121, #1112 + +## 1.12 + +- [ ] provider: add Box (@ife) +- [ ] plugins: audio/memo recording similar to Webcam #143 #198 (@arturi) +- [ ] test: add typescript with JSDoc for @uppy/core https://github.com/Microsoft/TypeScript/wiki/Type-Checking-JavaScript-Files (@arturi) +- [ ] core: add Vue.js wrapper component (@arturi) +- [ ] goldenretriever: confirmation before restore, add “ghost” files #443 #257 (@arturi) (@arturi) +- [ ] dashboard: fix Dashboard issues with Angular — it’s incredibly slow presumably because of ResizeObserver. (See #1613) (@arturi) +- [ ] dashboard: add VirtualList, so it can render 5000 files without lag (@goto-bus-stop, @lakesare) + +## 1.11 + +- [ ] dashboard: support for right-to-left languages (Arabic, Hebrew) (@arturi) +- [ ] plugins: Transformations, cropping, filters for images, study https://github.com/MattKetmo/darkroomjs/, https://github.com/fengyuanchen/cropperjs #151 #53 (@arturi) + +## 1.10 + +- [ ] plugins: screenshot+screencast support similar to Webcam #148 (@arturi) +- [ ] core: add maxTotalFileSize restriction (@arturi) +- [ ] core, transloadit: Allow new uploads when retrying; improve error handling (#1960 / @arturi) +- [ ] providers: Provider Browser don't handle uppy restrictions, can we hide things that don't match the restrictions in Google Drive and Instagram? #1827 # next @@ -111,11 +121,8 @@ PRs are welcome! Please do open an issue to discuss first if it's a big feature, - [ ] dashboard/dragndrop/fileinput: Add a `disabled` (`true`||`false`) option (https://github.com/transloadit/uppy/issues/1530) - [ ] statusbar: Add a confirmation of the cancel action (https://github.com/transloadit/uppy/issues/1418) - [ ] test: Switch one existing e2e test to use Parcel (create-react-app already using webpack) -- [ ] meta: Clean up CHANGELOG's Backlog. Requires an Uppy call - [ ] goldenretriever: make it work with aws multipart (@goto-bus-stop) https://community.transloadit.com/t/resumable-aws-s3-multipart-integration/14888 -- [ ] localepacks: Add Arabic, see if right-to-left causes issues, and fix them :) - [ ] chore: hunt down all `@TODO`s and either fix, or remove, or move to github issues/changelog backlog -- [ ] chore: remove dead code/commented blocks - [ ] @uppy/transloadit: finish Transloadit-Client header on https://github.com/transloadit/uppy/tree/feature/transloadit-client - [ ] dashboard: add option to use `body` or `window` or CSS selector as drop zone / paste zone as well, `DropPasteTarget` #1593 (@arturi) - [ ] dashboard: optional alert `onbeforeunload` while upload is in progress, safeguarding from accidentaly navigating away from a page with an ongoing upload From 013f5958d24d698e7b23bca5bea68fcd319af464 Mon Sep 17 00:00:00 2001 From: Artur Paikin Date: Sat, 8 Feb 2020 16:25:47 +0300 Subject: [PATCH 04/24] add tsv and tab (#2056) --- packages/@uppy/utils/src/mimeTypes.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/@uppy/utils/src/mimeTypes.js b/packages/@uppy/utils/src/mimeTypes.js index f92f10916f..74722949f0 100644 --- a/packages/@uppy/utils/src/mimeTypes.js +++ b/packages/@uppy/utils/src/mimeTypes.js @@ -17,6 +17,8 @@ module.exports = { yaml: 'text/yaml', yml: 'text/yaml', csv: 'text/csv', + tsv: 'text/tab-separated-values', + tab: 'text/tab-separated-values', avi: 'video/x-msvideo', mks: 'video/x-matroska', mkv: 'video/x-matroska', From d0f181caeb5bdf92a7c8f04d09c0d9edd6c20580 Mon Sep 17 00:00:00 2001 From: Artur Paikin Date: Mon, 10 Feb 2020 14:54:40 +0100 Subject: [PATCH 05/24] core: Add noNewAlreadyUploading and noDuplicates (#2057) * Add noNewAlreadyUploading and noDuplicates * Update en_US.js * fix test * Update index.js * Update en_US.js --- packages/@uppy/core/src/index.js | 6 ++++-- packages/@uppy/core/src/index.test.js | 2 +- packages/@uppy/locales/src/en_US.js | 2 ++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/@uppy/core/src/index.js b/packages/@uppy/core/src/index.js index 2806b00d17..5c77dc4158 100644 --- a/packages/@uppy/core/src/index.js +++ b/packages/@uppy/core/src/index.js @@ -51,6 +51,8 @@ class Uppy { }, exceedsSize: 'This file exceeds maximum allowed size of', youCanOnlyUploadFileTypes: 'You can only upload: %{types}', + noNewAlreadyUploading: 'Cannot add new files: already uploading', + noDuplicates: 'Cannot add the duplicate file \'%{fileName}\', it already exists', companionError: 'Connection with Companion failed', companionAuthError: 'Authorization required', companionUnauthorizeHint: 'To unauthorize to your %{provider} account, please go to %{url}', @@ -488,7 +490,7 @@ class Uppy { const { allowNewUpload } = this.getState() if (allowNewUpload === false) { - this._showOrLogErrorAndThrow(new RestrictionError('Cannot add new files: already uploading.'), { file }) + this._showOrLogErrorAndThrow(new RestrictionError(this.i18n('noNewAlreadyUploading')), { file }) } } @@ -528,7 +530,7 @@ class Uppy { const fileID = generateFileID(file) if (files[fileID]) { - this._showOrLogErrorAndThrow(new RestrictionError(`Cannot add the duplicate file '${fileName}', it already exists.`), { file }) + this._showOrLogErrorAndThrow(new RestrictionError(this.i18n('noDuplicates', { fileName })), { file }) } const meta = file.meta || {} diff --git a/packages/@uppy/core/src/index.test.js b/packages/@uppy/core/src/index.test.js index de4a62b844..14afe08c31 100644 --- a/packages/@uppy/core/src/index.test.js +++ b/packages/@uppy/core/src/index.test.js @@ -740,7 +740,7 @@ describe('src/Core', () => { data: new File([sampleImage], { type: 'image/jpeg' }) }) }).toThrow( - /Cannot add new files: already uploading\./ + /Cannot add new files: already uploading/ ) }) diff --git a/packages/@uppy/locales/src/en_US.js b/packages/@uppy/locales/src/en_US.js index 8478e807e0..c777d9dcc0 100644 --- a/packages/@uppy/locales/src/en_US.js +++ b/packages/@uppy/locales/src/en_US.js @@ -66,8 +66,10 @@ en_US.strings = { loading: 'Loading...', logOut: 'Log out', myDevice: 'My Device', + noDuplicates: 'Cannot add the duplicate file \'%{fileName}\', it already exists', noFilesFound: 'You have no files or folders here', noInternetConnection: 'No Internet connection', + noNewAlreadyUploading: 'Cannot add new files: already uploading', openFolderNamed: 'Open folder %{name}', pause: 'Pause', pauseUpload: 'Pause upload', From e63f666950ef41db95593887f63cd0649d305119 Mon Sep 17 00:00:00 2001 From: Artur Paikin Date: Mon, 10 Feb 2020 14:56:17 +0100 Subject: [PATCH 06/24] Add GoogleDocs todo --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b0bac803d..cccd3c51a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -102,6 +102,7 @@ PRs are welcome! Please do open an issue to discuss first if it's a big feature, - [ ] dashboard: support for right-to-left languages (Arabic, Hebrew) (@arturi) - [ ] plugins: Transformations, cropping, filters for images, study https://github.com/MattKetmo/darkroomjs/, https://github.com/fengyuanchen/cropperjs #151 #53 (@arturi) +- [ ] google-drive: Google Drive - Google Docs https://github.com/transloadit/uppy/issues/1554#issuecomment-554904049 (@ife) ## 1.10 From 561a436119875baf2cd6d4d4543418f1ff1cd15e Mon Sep 17 00:00:00 2001 From: Artur Paikin Date: Tue, 11 Feb 2020 02:52:16 +0100 Subject: [PATCH 07/24] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cccd3c51a0..fe2a22ee20 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -72,6 +72,7 @@ PRs are welcome! Please do open an issue to discuss first if it's a big feature, - [ ] form: make the `multipleResults` option `true` by default - [ ] core: pass full file object to `onBeforeFileAdded`. Maybe also check restrictions before calling the callbacks: https://github.com/transloadit/uppy/pull/1594 - [ ] tus: set the `limit` option to a sensible default, like 10 +- [ ] core: force the `new` keyword when instantiating Uppy — now we support both `mew Uppy()` and `Uppy()` which is harder to maintain and might lead to confusion - [ ] core: consider removing Preact from `Plugin` (maybe have a `(ui)Plugin extends BasePlugin`?) as pointed out on Reddit https://www.reddit.com/r/javascript/comments/bhkx5k/uppy_10_your_best_friend_in_file_uploading/ - [ ] providers: remove `serverHeaders` https://github.com/transloadit/uppy/pull/1861 - [ ] core: change the preprocessing --> uploading flow to allow for files to start uploading right away after their preprocessing step has finished. See #1738 (@goto-but-stop) From 856243a149739fbeeac9f75f1343c0bf71d6cf8f Mon Sep 17 00:00:00 2001 From: Artur Paikin Date: Tue, 11 Feb 2020 17:06:33 +0100 Subject: [PATCH 08/24] core, transloadit: Allow new uploads when retrying; improve error handling (#1960) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Set `allowNewUpload: true` when an error occurs to allow retryAll * Add assembly error message and assembly_id * Pass debug option to Robodog * Add forceAllowNewUpload to use in retry and retryAll, improve calls to _showOrLogErrorAndThrow * Capitalize Create Assembly message * don’t throw error from 'upload-error' event, improved error message structure * handle errors better * check if error.details exists * Doc tweaks: added error.assembly --- packages/@uppy/core/src/index.js | 79 ++++++++++++++++++---- packages/@uppy/robodog/src/createUppy.js | 3 +- packages/@uppy/status-bar/src/StatusBar.js | 16 ++--- packages/@uppy/status-bar/src/index.js | 9 +-- packages/@uppy/transloadit/src/Client.js | 7 +- packages/@uppy/transloadit/src/index.js | 7 +- website/src/docs/robodog-form.md | 4 ++ website/src/docs/transloadit.md | 4 +- 8 files changed, 90 insertions(+), 39 deletions(-) diff --git a/packages/@uppy/core/src/index.js b/packages/@uppy/core/src/index.js index 5c77dc4158..04bc1738ba 100644 --- a/packages/@uppy/core/src/index.js +++ b/packages/@uppy/core/src/index.js @@ -464,17 +464,32 @@ class Uppy { } } - _showOrLogErrorAndThrow (err, { showInformer = true, file = null } = {}) { + /** + * Logs an error, sets Informer message, then throws the error. + * Emits a 'restriction-failed' event if it’s a restriction error + * + * @param {object | string} err — Error object or plain string message + * @param {object} [options] + * @param {boolean} [options.showInformer=true] — Sometimes developer might want to show Informer manually + * @param {object} [options.file=null] — File object used to emit the restriction error + * @param {boolean} [options.throwErr=true] — Errors shouldn’t be thrown, for example, in `upload-error` event + * @private + */ + _showOrLogErrorAndThrow (err, { showInformer = true, file = null, throwErr = true } = {}) { const message = typeof err === 'object' ? err.message : err const details = (typeof err === 'object' && err.details) ? err.details : '' // Restriction errors should be logged, but not as errors, // as they are expected and shown in the UI. + let logMessageWithDetails = message + if (details) { + logMessageWithDetails += ' ' + details + } if (err.isRestriction) { - this.log(`${message} ${details}`) + this.log(logMessageWithDetails) this.emit('restriction-failed', file, err) } else { - this.log(`${message} ${details}`, 'error') + this.log(logMessageWithDetails, 'error') } // Sometimes informer has to be shown manually by the developer, @@ -483,7 +498,9 @@ class Uppy { this.info({ message: message, details: details }, 'error', 5000) } - throw (typeof err === 'object' ? err : new Error(err)) + if (throwErr) { + throw (typeof err === 'object' ? err : new Error(err)) + } } _assertNewUploadAllowed (file) { @@ -816,7 +833,9 @@ class Uppy { this.emit('retry-all', filesToRetry) - const uploadID = this._createUpload(filesToRetry) + const uploadID = this._createUpload(filesToRetry, { + forceAllowNewUpload: true // create new upload even if allowNewUpload: false + }) return this._runUpload(uploadID) } @@ -844,7 +863,9 @@ class Uppy { this.emit('upload-retry', fileID) - const uploadID = this._createUpload([fileID]) + const uploadID = this._createUpload([fileID], { + forceAllowNewUpload: true // create new upload even if allowNewUpload: false + }) return this._runUpload(uploadID) } @@ -937,22 +958,50 @@ class Uppy { */ _addListeners () { this.on('error', (error) => { - this.setState({ error: error.message || 'Unknown error' }) + let errorMsg = 'Unknown error' + if (error.message) { + errorMsg = error.message + } + + if (error.details) { + errorMsg += ' ' + error.details + } + + this.setState({ error: errorMsg }) }) this.on('upload-error', (file, error, response) => { + let errorMsg = 'Unknown error' + if (error.message) { + errorMsg = error.message + } + + if (error.details) { + errorMsg += ' ' + error.details + } + this.setFileState(file.id, { - error: error.message || 'Unknown error', + error: errorMsg, response }) this.setState({ error: error.message }) - let message = this.i18n('failedToUpload', { file: file.name }) if (typeof error === 'object' && error.message) { - message = { message: message, details: error.message } + const newError = new Error(error.message) + newError.details = error.message + if (error.details) { + newError.details += ' ' + error.details + } + newError.message = this.i18n('failedToUpload', { file: file.name }) + this._showOrLogErrorAndThrow(newError, { + throwErr: false + }) + } else { + this._showOrLogErrorAndThrow(error, { + throwErr: false + }) } - this.info(message, 'error', 5000) }) this.on('upload', () => { @@ -1289,9 +1338,13 @@ class Uppy { * @param {Array} fileIDs File IDs to include in this upload. * @returns {string} ID of this upload. */ - _createUpload (fileIDs) { + _createUpload (fileIDs, opts = {}) { + const { + forceAllowNewUpload = false // uppy.retryAll sets this to true — when retrying we want to ignore `allowNewUpload: false` + } = opts + const { allowNewUpload, currentUploads } = this.getState() - if (!allowNewUpload) { + if (!allowNewUpload && !forceAllowNewUpload) { throw new Error('Cannot create a new upload: already uploading.') } diff --git a/packages/@uppy/robodog/src/createUppy.js b/packages/@uppy/robodog/src/createUppy.js index da4edf5d99..46325472c8 100644 --- a/packages/@uppy/robodog/src/createUppy.js +++ b/packages/@uppy/robodog/src/createUppy.js @@ -32,7 +32,8 @@ const uppyOptionNames = [ 'restrictions', 'meta', 'onBeforeFileAdded', - 'onBeforeUpload' + 'onBeforeUpload', + 'debug' ] function createUppy (opts, overrides = {}) { const uppyOptions = {} diff --git a/packages/@uppy/status-bar/src/StatusBar.js b/packages/@uppy/status-bar/src/StatusBar.js index dfef14cb4f..335a04d924 100644 --- a/packages/@uppy/status-bar/src/StatusBar.js +++ b/packages/@uppy/status-bar/src/StatusBar.js @@ -105,11 +105,8 @@ module.exports = (props) => { uploadState !== statusBarStates.STATE_WAITING && uploadState !== statusBarStates.STATE_COMPLETE const showPauseResumeBtn = resumableUploads && !hidePauseResumeButton && - uploadState !== statusBarStates.STATE_WAITING && - uploadState !== statusBarStates.STATE_PREPROCESSING && - uploadState !== statusBarStates.STATE_POSTPROCESSING && - uploadState !== statusBarStates.STATE_ERROR && - uploadState !== statusBarStates.STATE_COMPLETE + uploadState === statusBarStates.STATE_UPLOADING + const showRetryBtn = error && !hideRetryButton const progressClassNames = `uppy-StatusBar-progress @@ -170,7 +167,9 @@ const RetryBtn = (props) => { return ( - + + + + ``` Then, a global `Robodog` variable will be available. For usage instructions, please see the [main Robodog documentation](https://uppy.io/docs/robodog). diff --git a/packages/@uppy/robodog/package.json b/packages/@uppy/robodog/package.json index 5ccb4ee0fa..da3fe11171 100644 --- a/packages/@uppy/robodog/package.json +++ b/packages/@uppy/robodog/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/robodog", "description": "Transloadit SDK for browsers based on Uppy", - "version": "1.4.2", + "version": "1.5.0", "license": "MIT", "main": "lib/index.js", "jsnext:main": "src/index.js", diff --git a/packages/@uppy/status-bar/package.json b/packages/@uppy/status-bar/package.json index eca414408b..17da6026bd 100644 --- a/packages/@uppy/status-bar/package.json +++ b/packages/@uppy/status-bar/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/status-bar", "description": "A progress bar for Uppy, with many bells and whistles.", - "version": "1.4.2", + "version": "1.5.0", "license": "MIT", "main": "lib/index.js", "style": "dist/style.min.css", diff --git a/packages/@uppy/thumbnail-generator/package-lock.json b/packages/@uppy/thumbnail-generator/package-lock.json index 0b56ce6494..2f5d8745cd 100644 --- a/packages/@uppy/thumbnail-generator/package-lock.json +++ b/packages/@uppy/thumbnail-generator/package-lock.json @@ -8,5 +8,5 @@ "integrity": "sha512-N/sMKHniSDJBjfrkbS/tpkPj4RAbvW3mr8UAzvlMHyun93XEm83IAvhWtJVHo+RHn/oO8Job5YN4b+wRjSVp5g==" } }, - "version": "1.5.2" + "version": "1.5.3" } diff --git a/packages/@uppy/thumbnail-generator/package.json b/packages/@uppy/thumbnail-generator/package.json index 7b94f3a7c6..98386eb849 100644 --- a/packages/@uppy/thumbnail-generator/package.json +++ b/packages/@uppy/thumbnail-generator/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/thumbnail-generator", "description": "Uppy plugin that generates small previews of images to show on your upload UI.", - "version": "1.5.2", + "version": "1.5.3", "license": "MIT", "main": "lib/index.js", "types": "types/index.d.ts", diff --git a/packages/@uppy/transloadit/package-lock.json b/packages/@uppy/transloadit/package-lock.json index 9f4b953dbe..eb7b052073 100644 --- a/packages/@uppy/transloadit/package-lock.json +++ b/packages/@uppy/transloadit/package-lock.json @@ -228,5 +228,5 @@ "integrity": "sha1-AI4G2AlDIMNy28L47XagymyKxBk=" } }, - "version": "1.4.2" + "version": "1.5.0" } diff --git a/packages/@uppy/transloadit/package.json b/packages/@uppy/transloadit/package.json index 6f4b9d0c32..64a6506b46 100644 --- a/packages/@uppy/transloadit/package.json +++ b/packages/@uppy/transloadit/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/transloadit", "description": "The Transloadit plugin can be used to upload files to Transloadit for all kinds of processing, such as transcoding video, resizing images, zipping/unzipping, and more", - "version": "1.4.2", + "version": "1.5.0", "license": "MIT", "main": "lib/index.js", "types": "types/index.d.ts", diff --git a/packages/@uppy/tus/package.json b/packages/@uppy/tus/package.json index d657e79eaf..9de9a51b25 100644 --- a/packages/@uppy/tus/package.json +++ b/packages/@uppy/tus/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/tus", "description": "Resumable uploads for Uppy using Tus.io", - "version": "1.5.2", + "version": "1.5.3", "license": "MIT", "main": "lib/index.js", "types": "types/index.d.ts", diff --git a/packages/@uppy/url/package.json b/packages/@uppy/url/package.json index 41f0b9f1e9..f1248cf329 100644 --- a/packages/@uppy/url/package.json +++ b/packages/@uppy/url/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/url", "description": "The Url plugin lets users import files from the Internet. Paste any URL and it’ll be added!", - "version": "1.4.2", + "version": "1.4.3", "license": "MIT", "main": "lib/index.js", "style": "dist/style.min.css", diff --git a/packages/@uppy/utils/package.json b/packages/@uppy/utils/package.json index d25cc4033a..8b43f09dd8 100644 --- a/packages/@uppy/utils/package.json +++ b/packages/@uppy/utils/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/utils", "description": "Shared utility functions for Uppy Core and plugins maintained by the Uppy team.", - "version": "2.1.2", + "version": "2.2.0", "license": "MIT", "main": "lib/index.js", "types": "types/index.d.ts", diff --git a/packages/@uppy/webcam/package.json b/packages/@uppy/webcam/package.json index 69340afff2..6fbf22676a 100644 --- a/packages/@uppy/webcam/package.json +++ b/packages/@uppy/webcam/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/webcam", "description": "Uppy plugin that takes photos or records videos using the device's camera.", - "version": "1.5.1", + "version": "1.5.2", "license": "MIT", "main": "lib/index.js", "style": "dist/style.min.css", diff --git a/packages/@uppy/xhr-upload/package.json b/packages/@uppy/xhr-upload/package.json index a23ed64e2d..0122906b63 100644 --- a/packages/@uppy/xhr-upload/package.json +++ b/packages/@uppy/xhr-upload/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/xhr-upload", "description": "Plain and simple classic HTML multipart form uploads with Uppy, as well as uploads using the HTTP PUT method.", - "version": "1.4.2", + "version": "1.5.0", "license": "MIT", "main": "lib/index.js", "types": "types/index.d.ts", diff --git a/packages/uppy/package.json b/packages/uppy/package.json index 8c37fe9bea..d8d768fb87 100644 --- a/packages/uppy/package.json +++ b/packages/uppy/package.json @@ -1,7 +1,7 @@ { "name": "uppy", "description": "Extensible JavaScript file upload widget with support for drag&drop, resumable uploads, previews, restrictions, file processing/encoding, remote providers like Instagram, Dropbox, Google Drive, S3 and more :dog:", - "version": "1.8.0", + "version": "1.9.0", "license": "MIT", "main": "index.js", "module": "index.mjs", diff --git a/website/src/docs/index.md b/website/src/docs/index.md index d8c8a6ebd4..89e4fd266b 100644 --- a/website/src/docs/index.md +++ b/website/src/docs/index.md @@ -19,12 +19,12 @@ Here’s the simplest example html page with Uppy (it uses a CDN bundle, while w Uppy - +
- + + ``` 2\. Add CSS to ``: ``` html - + ``` 3\. Initialize at the bottom of the closing `` tag: @@ -169,5 +169,5 @@ const Uppy = require('@uppy/core') If you're using Uppy from CDN, `es6-promise` and `whatwg-fetch` are already included in the bundle, no need to include anything additionally: ```html - + ``` diff --git a/website/src/docs/locales.md b/website/src/docs/locales.md index 64bf99c9a2..78eae87b6a 100644 --- a/website/src/docs/locales.md +++ b/website/src/docs/locales.md @@ -33,8 +33,8 @@ const uppy = Uppy({ Add a ` - + + + + + + ``` diff --git a/website/src/examples/dashboard/app.es6 b/website/src/examples/dashboard/app.es6 index 7223c8a306..8a61231f2e 100644 --- a/website/src/examples/dashboard/app.es6 +++ b/website/src/examples/dashboard/app.es6 @@ -154,7 +154,7 @@ function loadLocaleFromCDN (localeName) { var head = document.getElementsByTagName('head')[0] var js = document.createElement('script') js.type = 'text/javascript' - js.src = `https://transloadit.edgly.net/releases/uppy/locales/v1.11.0/${localeName}.min.js` + js.src = `https://transloadit.edgly.net/releases/uppy/locales/v1.11.1/${localeName}.min.js` head.appendChild(js) } diff --git a/website/src/examples/i18n/app.html b/website/src/examples/i18n/app.html index d4694cf0f9..9f3eea112f 100644 --- a/website/src/examples/i18n/app.html +++ b/website/src/examples/i18n/app.html @@ -1,7 +1,7 @@ - +
@@ -12,8 +12,8 @@
Uploaded files:
- - + + +// const robodog = require('@uppy/robodog') const TRANSLOADIT_EXAMPLE_KEY = '35c1aed03f5011e982b6afe82599b6a0' diff --git a/website/src/examples/markdown-snippets/app.html b/website/src/examples/markdown-snippets/app.html index d90cf7b1d5..d0265734e7 100644 --- a/website/src/examples/markdown-snippets/app.html +++ b/website/src/examples/markdown-snippets/app.html @@ -1,6 +1,6 @@ + -->

Create a new snippet

diff --git a/website/themes/uppy/layout/index.ejs b/website/themes/uppy/layout/index.ejs index 791f625ba2..afb4233f14 100644 --- a/website/themes/uppy/layout/index.ejs +++ b/website/themes/uppy/layout/index.ejs @@ -144,8 +144,8 @@

© <%- date(Date.now(), 'YYYY') %> Transloadit

- - + + +
@@ -174,7 +174,7 @@ const Uppy = require('@uppy/core') If you're using Uppy from CDN, `es6-promise` and `whatwg-fetch` are already included in the bundle, so no need to include anything additionally: ```html - + ``` ## FAQ diff --git a/examples/cdn-example/index.html b/examples/cdn-example/index.html index b0eb7280e3..df01217589 100644 --- a/examples/cdn-example/index.html +++ b/examples/cdn-example/index.html @@ -4,11 +4,11 @@ - + - + + + + ``` Then, a global `Robodog` variable will be available. For usage instructions, please see the [main Robodog documentation](https://uppy.io/docs/robodog). diff --git a/packages/@uppy/robodog/package.json b/packages/@uppy/robodog/package.json index da3fe11171..5964bd2306 100644 --- a/packages/@uppy/robodog/package.json +++ b/packages/@uppy/robodog/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/robodog", "description": "Transloadit SDK for browsers based on Uppy", - "version": "1.5.0", + "version": "1.5.1", "license": "MIT", "main": "lib/index.js", "jsnext:main": "src/index.js", diff --git a/packages/@uppy/status-bar/package.json b/packages/@uppy/status-bar/package.json index 17da6026bd..a5a175d8e7 100644 --- a/packages/@uppy/status-bar/package.json +++ b/packages/@uppy/status-bar/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/status-bar", "description": "A progress bar for Uppy, with many bells and whistles.", - "version": "1.5.0", + "version": "1.5.1", "license": "MIT", "main": "lib/index.js", "style": "dist/style.min.css", diff --git a/packages/@uppy/thumbnail-generator/package-lock.json b/packages/@uppy/thumbnail-generator/package-lock.json index 2f5d8745cd..88d1d8bc04 100644 --- a/packages/@uppy/thumbnail-generator/package-lock.json +++ b/packages/@uppy/thumbnail-generator/package-lock.json @@ -8,5 +8,5 @@ "integrity": "sha512-N/sMKHniSDJBjfrkbS/tpkPj4RAbvW3mr8UAzvlMHyun93XEm83IAvhWtJVHo+RHn/oO8Job5YN4b+wRjSVp5g==" } }, - "version": "1.5.3" + "version": "1.5.4" } diff --git a/packages/@uppy/thumbnail-generator/package.json b/packages/@uppy/thumbnail-generator/package.json index 98386eb849..9e6b410fb1 100644 --- a/packages/@uppy/thumbnail-generator/package.json +++ b/packages/@uppy/thumbnail-generator/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/thumbnail-generator", "description": "Uppy plugin that generates small previews of images to show on your upload UI.", - "version": "1.5.3", + "version": "1.5.4", "license": "MIT", "main": "lib/index.js", "types": "types/index.d.ts", diff --git a/packages/@uppy/transloadit/package-lock.json b/packages/@uppy/transloadit/package-lock.json index eb7b052073..9c2c768e50 100644 --- a/packages/@uppy/transloadit/package-lock.json +++ b/packages/@uppy/transloadit/package-lock.json @@ -228,5 +228,5 @@ "integrity": "sha1-AI4G2AlDIMNy28L47XagymyKxBk=" } }, - "version": "1.5.0" + "version": "1.5.1" } diff --git a/packages/@uppy/transloadit/package.json b/packages/@uppy/transloadit/package.json index 64a6506b46..68219c3e25 100644 --- a/packages/@uppy/transloadit/package.json +++ b/packages/@uppy/transloadit/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/transloadit", "description": "The Transloadit plugin can be used to upload files to Transloadit for all kinds of processing, such as transcoding video, resizing images, zipping/unzipping, and more", - "version": "1.5.0", + "version": "1.5.1", "license": "MIT", "main": "lib/index.js", "types": "types/index.d.ts", diff --git a/packages/@uppy/tus/package.json b/packages/@uppy/tus/package.json index 9de9a51b25..7df1e0b3d4 100644 --- a/packages/@uppy/tus/package.json +++ b/packages/@uppy/tus/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/tus", "description": "Resumable uploads for Uppy using Tus.io", - "version": "1.5.3", + "version": "1.5.4", "license": "MIT", "main": "lib/index.js", "types": "types/index.d.ts", diff --git a/packages/@uppy/url/package.json b/packages/@uppy/url/package.json index f1248cf329..1352b51186 100644 --- a/packages/@uppy/url/package.json +++ b/packages/@uppy/url/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/url", "description": "The Url plugin lets users import files from the Internet. Paste any URL and it’ll be added!", - "version": "1.4.3", + "version": "1.4.4", "license": "MIT", "main": "lib/index.js", "style": "dist/style.min.css", diff --git a/packages/@uppy/utils/package.json b/packages/@uppy/utils/package.json index 8b43f09dd8..762ee53477 100644 --- a/packages/@uppy/utils/package.json +++ b/packages/@uppy/utils/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/utils", "description": "Shared utility functions for Uppy Core and plugins maintained by the Uppy team.", - "version": "2.2.0", + "version": "2.2.1", "license": "MIT", "main": "lib/index.js", "types": "types/index.d.ts", diff --git a/packages/@uppy/webcam/package.json b/packages/@uppy/webcam/package.json index 6fbf22676a..2c8cd25a33 100644 --- a/packages/@uppy/webcam/package.json +++ b/packages/@uppy/webcam/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/webcam", "description": "Uppy plugin that takes photos or records videos using the device's camera.", - "version": "1.5.2", + "version": "1.5.3", "license": "MIT", "main": "lib/index.js", "style": "dist/style.min.css", diff --git a/packages/@uppy/xhr-upload/package.json b/packages/@uppy/xhr-upload/package.json index 0122906b63..479a21f5d4 100644 --- a/packages/@uppy/xhr-upload/package.json +++ b/packages/@uppy/xhr-upload/package.json @@ -1,7 +1,7 @@ { "name": "@uppy/xhr-upload", "description": "Plain and simple classic HTML multipart form uploads with Uppy, as well as uploads using the HTTP PUT method.", - "version": "1.5.0", + "version": "1.5.1", "license": "MIT", "main": "lib/index.js", "types": "types/index.d.ts", diff --git a/packages/uppy/package.json b/packages/uppy/package.json index d8d768fb87..7ed92070eb 100644 --- a/packages/uppy/package.json +++ b/packages/uppy/package.json @@ -1,7 +1,7 @@ { "name": "uppy", "description": "Extensible JavaScript file upload widget with support for drag&drop, resumable uploads, previews, restrictions, file processing/encoding, remote providers like Instagram, Dropbox, Google Drive, S3 and more :dog:", - "version": "1.9.0", + "version": "1.9.1", "license": "MIT", "main": "index.js", "module": "index.mjs", diff --git a/website/src/docs/index.md b/website/src/docs/index.md index 89e4fd266b..b7059cb938 100644 --- a/website/src/docs/index.md +++ b/website/src/docs/index.md @@ -19,12 +19,12 @@ Here’s the simplest example html page with Uppy (it uses a CDN bundle, while w Uppy - +
- + + ``` 2\. Add CSS to ``: ``` html - + ``` 3\. Initialize at the bottom of the closing `` tag: @@ -169,5 +169,5 @@ const Uppy = require('@uppy/core') If you're using Uppy from CDN, `es6-promise` and `whatwg-fetch` are already included in the bundle, no need to include anything additionally: ```html - + ``` diff --git a/website/src/docs/locales.md b/website/src/docs/locales.md index 78eae87b6a..9772724bc3 100644 --- a/website/src/docs/locales.md +++ b/website/src/docs/locales.md @@ -33,8 +33,8 @@ const uppy = Uppy({ Add a ` - + + + + + + ``` diff --git a/website/src/examples/dashboard/app.es6 b/website/src/examples/dashboard/app.es6 index 8a61231f2e..2908b82309 100644 --- a/website/src/examples/dashboard/app.es6 +++ b/website/src/examples/dashboard/app.es6 @@ -154,7 +154,7 @@ function loadLocaleFromCDN (localeName) { var head = document.getElementsByTagName('head')[0] var js = document.createElement('script') js.type = 'text/javascript' - js.src = `https://transloadit.edgly.net/releases/uppy/locales/v1.11.1/${localeName}.min.js` + js.src = `https://transloadit.edgly.net/releases/uppy/locales/v1.11.2/${localeName}.min.js` head.appendChild(js) } diff --git a/website/src/examples/i18n/app.html b/website/src/examples/i18n/app.html index 9f3eea112f..356ba6cbf2 100644 --- a/website/src/examples/i18n/app.html +++ b/website/src/examples/i18n/app.html @@ -1,7 +1,7 @@ - +
@@ -12,8 +12,8 @@
Uploaded files:
- - + + +// const robodog = require('@uppy/robodog') const TRANSLOADIT_EXAMPLE_KEY = '35c1aed03f5011e982b6afe82599b6a0' diff --git a/website/src/examples/markdown-snippets/app.html b/website/src/examples/markdown-snippets/app.html index d0265734e7..0d86645021 100644 --- a/website/src/examples/markdown-snippets/app.html +++ b/website/src/examples/markdown-snippets/app.html @@ -1,6 +1,6 @@ + -->

Create a new snippet

diff --git a/website/themes/uppy/layout/index.ejs b/website/themes/uppy/layout/index.ejs index afb4233f14..d5aef6845e 100644 --- a/website/themes/uppy/layout/index.ejs +++ b/website/themes/uppy/layout/index.ejs @@ -144,8 +144,8 @@

© <%- date(Date.now(), 'YYYY') %> Transloadit

- - + +