Skip to content
This repository was archived by the owner on Jan 2, 2026. It is now read-only.

Commit fa2ca2d

Browse files
committed
fix(filesystem): add header to upload file
1 parent 800623e commit fa2ca2d

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "0.1.9",
2+
"version": "0.1.11",
33
"license": "Apache-2.0",
44
"main": "dist/index.js",
55
"typings": "dist/index.d.ts",

src/filesystem.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ export class Filesystem {
4747
headers.append('Accept', 'application/json');
4848
headers.append('Content-Type', 'multipart/form-data');
4949

50+
if (this.clientCaller.apiToken) {
51+
headers.append('Authorization', `Bearer ${this.clientCaller.apiToken}`);
52+
}
53+
5054
await fetch(`${this.clientCaller.endpoint}/fs/write`, {
5155
method: 'POST',
5256
body: formData,

0 commit comments

Comments
 (0)