@web-portal/core-infrastructure 1.0.2 → 1.0.3
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/fesm2022/web-portal-core-infrastructure.mjs +42 -9
- package/fesm2022/web-portal-core-infrastructure.mjs.map +1 -1
- package/lib/services/file-aia-gcs.service.d.ts +3 -9
- package/lib/services/file-gcs.service.d.ts +3 -9
- package/lib/services/file-wap-gcs.service.d.ts +3 -9
- package/lib/services/file.service.d.ts +6 -0
- package/package.json +1 -1
|
@@ -1757,8 +1757,14 @@ class FileGCSService {
|
|
|
1757
1757
|
xhr = null;
|
|
1758
1758
|
}
|
|
1759
1759
|
};
|
|
1760
|
-
const progressHandler = (
|
|
1761
|
-
|
|
1760
|
+
const progressHandler = (event) => {
|
|
1761
|
+
if (event.lengthComputable) {
|
|
1762
|
+
observer.next({
|
|
1763
|
+
type: HttpEventType.UploadProgress,
|
|
1764
|
+
loaded: event.loaded,
|
|
1765
|
+
total: event.total,
|
|
1766
|
+
});
|
|
1767
|
+
}
|
|
1762
1768
|
};
|
|
1763
1769
|
const loadHandler = async () => {
|
|
1764
1770
|
if (xhr && xhr.status === 200) {
|
|
@@ -1766,7 +1772,12 @@ class FileGCSService {
|
|
|
1766
1772
|
const finalUrl = absoluteURL || presignedURL;
|
|
1767
1773
|
const result = this.buildResult(file, filePath, finalUrl);
|
|
1768
1774
|
cleanup();
|
|
1769
|
-
observer.next(
|
|
1775
|
+
observer.next(new HttpResponse({
|
|
1776
|
+
body: result,
|
|
1777
|
+
status: 200,
|
|
1778
|
+
statusText: "OK",
|
|
1779
|
+
url: presignedURL,
|
|
1780
|
+
}));
|
|
1770
1781
|
observer.complete();
|
|
1771
1782
|
}
|
|
1772
1783
|
catch (err) {
|
|
@@ -1984,8 +1995,14 @@ class FileAIA_GCSService {
|
|
|
1984
1995
|
xhr = null;
|
|
1985
1996
|
}
|
|
1986
1997
|
};
|
|
1987
|
-
const progressHandler = (
|
|
1988
|
-
|
|
1998
|
+
const progressHandler = (event) => {
|
|
1999
|
+
if (event.lengthComputable) {
|
|
2000
|
+
observer.next({
|
|
2001
|
+
type: HttpEventType.UploadProgress,
|
|
2002
|
+
loaded: event.loaded,
|
|
2003
|
+
total: event.total,
|
|
2004
|
+
});
|
|
2005
|
+
}
|
|
1989
2006
|
};
|
|
1990
2007
|
const loadHandler = async () => {
|
|
1991
2008
|
if (xhr && xhr.status === 200) {
|
|
@@ -1993,7 +2010,12 @@ class FileAIA_GCSService {
|
|
|
1993
2010
|
const finalUrl = absoluteURL || presignedURL;
|
|
1994
2011
|
const result = this.buildResult(file, filePath, finalUrl);
|
|
1995
2012
|
cleanup();
|
|
1996
|
-
observer.next(
|
|
2013
|
+
observer.next(new HttpResponse({
|
|
2014
|
+
body: result,
|
|
2015
|
+
status: 200,
|
|
2016
|
+
statusText: "OK",
|
|
2017
|
+
url: presignedURL,
|
|
2018
|
+
}));
|
|
1997
2019
|
observer.complete();
|
|
1998
2020
|
}
|
|
1999
2021
|
catch (err) {
|
|
@@ -2214,8 +2236,14 @@ class FileWAPGCSService {
|
|
|
2214
2236
|
xhr = null;
|
|
2215
2237
|
}
|
|
2216
2238
|
};
|
|
2217
|
-
const progressHandler = (
|
|
2218
|
-
|
|
2239
|
+
const progressHandler = (event) => {
|
|
2240
|
+
if (event.lengthComputable) {
|
|
2241
|
+
observer.next({
|
|
2242
|
+
type: HttpEventType.UploadProgress,
|
|
2243
|
+
loaded: event.loaded,
|
|
2244
|
+
total: event.total,
|
|
2245
|
+
});
|
|
2246
|
+
}
|
|
2219
2247
|
};
|
|
2220
2248
|
const loadHandler = async () => {
|
|
2221
2249
|
if (xhr && xhr.status === 200) {
|
|
@@ -2229,7 +2257,12 @@ class FileWAPGCSService {
|
|
|
2229
2257
|
const finalUrl = absoluteURL || presignedURL;
|
|
2230
2258
|
const result = this.buildResult(file, filePath, finalUrl);
|
|
2231
2259
|
cleanup();
|
|
2232
|
-
observer.next(
|
|
2260
|
+
observer.next(new HttpResponse({
|
|
2261
|
+
body: result,
|
|
2262
|
+
status: 200,
|
|
2263
|
+
statusText: "OK",
|
|
2264
|
+
url: presignedURL,
|
|
2265
|
+
}));
|
|
2233
2266
|
observer.complete();
|
|
2234
2267
|
}
|
|
2235
2268
|
catch (err) {
|