uppy/packages
Renée Kooi fb23bd2a20
xhr-upload: accept a headers: (file) => {} function (#2747)
With this patch you can do
```js
uppy.use(XHRUpload, {
  headers: file => ({
    'authorization': `bearer ${global.userToken}`,
    'header-name': file.meta.someMetaValue
  })
})
```
to determine file-specific headers.

The function syntax for `headers` is only available if the `bundle`
option is `false` (the default). `bundle` uploads only use one set of
headers.
2021-02-02 09:20:35 +01:00
..
@uppy xhr-upload: accept a headers: (file) => {} function (#2747) 2021-02-02 09:20:35 +01:00
uppy Release 2021-01-28 16:08:14 +00:00