@micromerce/media-fileuploader 1.0.2242 → 1.0.2247
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/FileUploader/FileUploader.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/FileUploader/FileUploader.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -6,7 +6,7 @@ export type endpoint = {
|
|
|
6
6
|
export type headers = {
|
|
7
7
|
[key: string]: string;
|
|
8
8
|
};
|
|
9
|
-
export type authorizationHeader = (url: string, method: string) => string
|
|
9
|
+
export type authorizationHeader = (url: string, method: string) => string | Promise<string>;
|
|
10
10
|
export type previewUrl = (url: string) => Promise<string>;
|
|
11
11
|
export type onUploadSuccess = (value: string) => void;
|
|
12
12
|
export type onError = (errorMessage: string) => void;
|
package/dist/esm/index.js
CHANGED
|
@@ -15350,7 +15350,7 @@ const FileUploader = ({ ...props }) => {
|
|
|
15350
15350
|
if (language)
|
|
15351
15351
|
request.setHeader('accept-language', language);
|
|
15352
15352
|
if (authorizationHeader) {
|
|
15353
|
-
const authorization = authorizationHeader(request.getURL(), request.getMethod());
|
|
15353
|
+
const authorization = await authorizationHeader(request.getURL(), request.getMethod());
|
|
15354
15354
|
request.setHeader('Authorization', authorization);
|
|
15355
15355
|
if (headers) {
|
|
15356
15356
|
Object.entries(headers).forEach(([key, value]) => {
|