@webitel/ui-sdk 3.2.114 → 3.2.115

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webitel/ui-sdk",
3
- "version": "3.2.114",
3
+ "version": "3.2.115",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve-lib": "vue-cli-service serve",
@@ -1,6 +1,7 @@
1
1
  import jszipUtils from 'jszip-utils';
2
2
  import { saveAs } from 'file-saver';
3
3
  import JSZip from 'jszip';
4
+ import path from 'path';
4
5
  import generateMediaURL from './scripts/generateMediaURL';
5
6
 
6
7
  /* eslint-disable no-await-in-loop, no-restricted-syntax */
@@ -47,7 +48,9 @@ export default class FilesExport {
47
48
  } else {
48
49
  const binary = await this._fetchFileBinary(item.id);
49
50
  const ext = item.mimeType.split('/').pop();
50
- zip.file(`${item.name}.${ext}`, binary);
51
+ // itemName needed to remove extension from item.name https://stackoverflow.com/a/31615711
52
+ const itemName = path.parse(item.name).name;
53
+ zip.file(`${itemName}.${ext}`, binary);
51
54
  this.downloadProgress.count += 1;
52
55
  }
53
56
  }