@webitel/api-services 0.0.68 → 0.0.69

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/api-services",
3
- "version": "0.0.68",
3
+ "version": "0.0.69",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "make-all": "npm run gen:api && npm version patch && (npm run build:types || true) && (npm run format:all || true) && npm run publish-lib",
@@ -72,7 +72,11 @@ export const downloadMedia = async (id) => {
72
72
  export const downloadFile = (id) => {
73
73
  const accessToken = localStorage.getItem('access-token'); // after auth token variable is null
74
74
  const url = `${baseUrl}/storage/file/${id}/download?access_token=${accessToken}`;
75
- window.open(url, '_blank');
75
+ const link = document.createElement('a');
76
+ link.href = url;
77
+ document.body.appendChild(link);
78
+ link.click();
79
+ document.body.removeChild(link);
76
80
  };
77
81
 
78
82
  export const getScreenRecordingMediaUrl = (id, isThumb = false) => {