Skip to content

Commit e64f7a5

Browse files
committed
🐛 Add missing authorization header to image upload
1 parent 20f3b0e commit e64f7a5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/utils/imageUpload.js

+7
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ export default async function imageUpload(
2222
if (personId) headers.set('X-Person-Id', personId);
2323
if (siteId) headers.set('X-Site-Id', siteId);
2424

25+
if (chayns.env.user.isAuthenticated) {
26+
headers.set(
27+
'Authorization',
28+
`bearer ${chayns.env.user.tobitAccessToken}`
29+
);
30+
}
31+
2532
/** @type {string | ArrayBuffer} */
2633
let body;
2734

0 commit comments

Comments
 (0)