Skip to content

Commit

Permalink
@uppy/tus: fix no headers passed to companion if argument is a functi…
Browse files Browse the repository at this point in the history
…on (#5182)

Update index.ts
  • Loading branch information
netdown authored May 21, 2024
1 parent b5539de commit a57bf8f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/@uppy/tus/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,10 @@ export default class Tus<M extends Meta, B extends Body> extends BasePlugin<
Object.assign(opts, file.tus)
}

if (typeof opts.headers === 'function') {
opts.headers = opts.headers(file)
}

return {
...file.remote?.body,
endpoint: opts.endpoint,
Expand Down

0 comments on commit a57bf8f

Please sign in to comment.