polfan-server-js-client 0.2.39 → 0.2.40

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.
@@ -5,6 +5,11 @@
5
5
  </component>
6
6
  <component name="ChangeListManager">
7
7
  <list default="true" id="831dae43-0da1-47fd-a5f7-33dd5eec2992" name="Changes" comment="Adapt FilesClient to new files API">
8
+ <change beforePath="$PROJECT_DIR$/build/index.cjs.js" beforeDir="false" afterPath="$PROJECT_DIR$/build/index.cjs.js" afterDir="false" />
9
+ <change beforePath="$PROJECT_DIR$/build/index.cjs.js.map" beforeDir="false" afterPath="$PROJECT_DIR$/build/index.cjs.js.map" afterDir="false" />
10
+ <change beforePath="$PROJECT_DIR$/build/index.umd.js" beforeDir="false" afterPath="$PROJECT_DIR$/build/index.umd.js" afterDir="false" />
11
+ <change beforePath="$PROJECT_DIR$/build/index.umd.js.map" beforeDir="false" afterPath="$PROJECT_DIR$/build/index.umd.js.map" afterDir="false" />
12
+ <change beforePath="$PROJECT_DIR$/build/types/FilesClient.d.ts" beforeDir="false" afterPath="$PROJECT_DIR$/build/types/FilesClient.d.ts" afterDir="false" />
8
13
  <change beforePath="$PROJECT_DIR$/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/package.json" afterDir="false" />
9
14
  <change beforePath="$PROJECT_DIR$/src/FilesClient.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/FilesClient.ts" afterDir="false" />
10
15
  </list>
@@ -121,7 +126,7 @@
121
126
  <workItem from="1751811595978" duration="792000" />
122
127
  <workItem from="1752705788150" duration="3566000" />
123
128
  <workItem from="1752756543261" duration="1956000" />
124
- <workItem from="1752834023436" duration="1731000" />
129
+ <workItem from="1752834023436" duration="2416000" />
125
130
  </task>
126
131
  <task id="LOCAL-00001" summary="Emoticons objects">
127
132
  <option name="closed" value="true" />
@@ -2238,10 +2238,11 @@ class FilesClient extends AbstractRestClient {
2238
2238
  FilesClient_defineProperty(this, "defaultUrl", 'https://files.devana.pl');
2239
2239
  }
2240
2240
  async uploadFile(file) {
2241
+ const name = encodeURIComponent(file.name ?? '');
2241
2242
  let headers = {
2242
2243
  ...this.getAuthHeaders(),
2243
2244
  Accept: 'application/json',
2244
- 'Content-Disposition': `attachment; filename="${file.name ?? ''}"`,
2245
+ 'Content-Disposition': `attachment; filename="${name}"`,
2245
2246
  'Content-Length': file.size
2246
2247
  };
2247
2248
  const response = await fetch(this.getUrl('files'), {