{"record":{"id":"fba0ebaa4cffd13e","repo":"transloadit/uppy","slug":"the-metafields-option-has-been-renamed-to-allow","errorCode":null,"errorMessage":"The `metaFields` option has been renamed to `allowedMetaFields`.","messagePattern":"The `metaFields` option has been renamed to `allowedMetaFields`\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/@uppy/tus/src/index.ts","lineNumber":139,"sourceCode":"  B\n> {\n  static VERSION = packageJson.version\n\n  #retryDelayIterator\n\n  requests: RateLimitedQueue\n\n  uploaders: Record<string, tus.Upload | null>\n\n  uploaderEvents: Record<string, EventManager<M, B> | null>\n\n  constructor(uppy: Uppy<M, B>, opts: TusOpts<M, B>) {\n    super(uppy, { ...defaultOptions, ...opts })\n    this.type = 'uploader'\n    this.id = this.opts.id || 'Tus'\n\n    if (opts?.allowedMetaFields === undefined && 'metaFields' in this.opts) {\n      throw new Error(\n        'The `metaFields` option has been renamed to `allowedMetaFields`.',\n      )\n    }\n\n    if ('autoRetry' in opts) {\n      throw new Error(\n        'The `autoRetry` option was deprecated and has been removed.',\n      )\n    }\n\n    /**\n     * Simultaneous upload limiting is shared across all uploads with this plugin.\n     *\n     * @type {RateLimitedQueue}\n     */\n    this.requests =\n      this.opts.rateLimitedQueue ?? new RateLimitedQueue(this.opts.limit)\n    this.#retryDelayIterator = this.opts.retryDelays?.values()","sourceCodeStart":121,"sourceCodeEnd":157,"githubUrl":"https://github.com/transloadit/uppy/blob/5d4dedd02a1ac0ae022c75c54aca76558f88e256/packages/@uppy/tus/src/index.ts#L121-L157","documentation":"The Tus plugin's constructor throws immediately when it detects the removed metaFields option. The option was renamed to allowedMetaFields, and the explicit error exists to fail fast instead of silently ignoring your metadata field selection.","triggerScenarios":"Instantiating new Tus(uppy, { metaFields: [...] }) or passing any opts object with a metaFields key while not setting allowedMetaFields.","commonSituations":"Upgrading from an old Uppy version (pre-rename) without migrating plugin options; copy-pasted legacy snippets or tutorials.","solutions":["Rename metaFields to allowedMetaFields in your Tus options","Remove any leftover metaFields keys in shared/config objects"],"exampleFix":"// before\nnew Tus(uppy, { metaFields: ['caption', 'license'] })\n// after\nnew Tus(uppy, { allowedMetaFields: ['caption', 'license'] })","handlingStrategy":"validation","validationCode":"const tusOpts = { ...legacy };\ndelete tusOpts.metaFields;\n// then migrate\nconst normalized = 'metaFields' in tusOpts\n  ? { allowedMetaFields: tusOpts.metaFields, ...tusOpts }\n  : tusOpts","typeGuard":"const hasRenamedOption = (o: object): o is { metaFields: unknown } => 'metaFields' in o","tryCatchPattern":null,"preventionTips":["Search your config for 'metaFields' after upgrading Uppy","Keep plugin options in typed objects so TypeScript flags unknown keys"],"tags":["tus","migration","renamed-option","breaking-change"],"backgroundTag":"renamed-config-option","analyzedSha":"5d4dedd02a1ac0ae022c75c54aca76558f88e256","analyzedAt":"2026-08-28T12:18:41.267Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}