odysseyscience / react-s3-uploader

React component that renders an <input type="file"/> and automatically uploads to an S3 bucket

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Type for signingUrlHeaders is wrong

mclean25 opened this issue · comments

signingUrlHeaders has the type

signingUrlHeaders?: {
    additional: object;
} | undefined

But it appears that what it expects is more of a Record<string, unknown> which is incompatible with the aforementioned type. I was able to get my header to work by doing the following:

const headers = { Authorization: `Bearer ${accessToken}` }
<ReactS3Uploader
        // ...
        signingUrlHeaders={headers as any} 
        // ...
 />

Thank you. This helped me.

same for signingUrlQueryParams