diff --git a/packages/@uppy/transloadit/src/AssemblyOptions.js b/packages/@uppy/transloadit/src/AssemblyOptions.js index bfce66c7a..9d1447304 100644 --- a/packages/@uppy/transloadit/src/AssemblyOptions.js +++ b/packages/@uppy/transloadit/src/AssemblyOptions.js @@ -19,7 +19,7 @@ function validateParams (params) { if (!params.auth || !params.auth.key) { throw new Error('Transloadit: The `params.auth.key` option is required. ' + - 'You can find your Transloadit API key at https://transloadit.com/accounts/credentials.') + 'You can find your Transloadit API key at https://transloadit.com/account/api-settings.') } } diff --git a/packages/@uppy/transloadit/src/index.js b/packages/@uppy/transloadit/src/index.js index 6b1b1b1db..0e1965bf7 100644 --- a/packages/@uppy/transloadit/src/index.js +++ b/packages/@uppy/transloadit/src/index.js @@ -67,8 +67,13 @@ module.exports = class Transloadit extends Plugin { this._onRestored = this._onRestored.bind(this) this._getPersistentData = this._getPersistentData.bind(this) + const hasCustomAssemblyOptions = this.opts.getAssemblyOptions !== defaultOptions.getAssemblyOptions if (this.opts.params) { AssemblyOptions.validateParams(this.opts.params) + } else if (!hasCustomAssemblyOptions) { + // Throw the same error that we'd throw if the `params` returned from a + // `getAssemblyOptions()` function is null. + AssemblyOptions.validateParams(null) } this.client = new Client({