diff --git a/package-lock.json b/package-lock.json index 20696fe..34ffe61 100644 --- a/package-lock.json +++ b/package-lock.json @@ -38,7 +38,7 @@ "jwt-decode": "^4.0.0", "network-service": "^0.0.1", "project-player": "^1.1.7", - "questionnaire-webcomponent": "^4.0.3", + "questionnaire-webcomponent": "^4.0.5", "rxjs": "~7.8.0", "swiper": "^11.1.1", "tslib": "^2.6.3", @@ -13695,9 +13695,9 @@ } }, "node_modules/questionnaire-webcomponent": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/questionnaire-webcomponent/-/questionnaire-webcomponent-4.0.3.tgz", - "integrity": "sha512-95cKTdEIIQUgl+CZyXweZkzKiRFQpLnHycFGxQAf5z7+6bcxNj24+pEHZV66e3XCHMaXVL02TuLHdntVam4wRg==", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/questionnaire-webcomponent/-/questionnaire-webcomponent-4.0.5.tgz", + "integrity": "sha512-MKklwM77jNGPYQNR4PN9xhaRrYbBaMLj5YCS/yLQXRzFA8/pEXHsir1z3mHyobxBvh6dCsuAa55Mua6mZatkRw==", "license": "MIT" }, "node_modules/queue-microtask": { diff --git a/package.json b/package.json index 5532231..7e0820d 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "jwt-decode": "^4.0.0", "network-service": "^0.0.1", "project-player": "^1.1.7", - "questionnaire-webcomponent": "^4.0.3", + "questionnaire-webcomponent": "^4.0.5", "rxjs": "~7.8.0", "swiper": "^11.1.1", "tslib": "^2.6.3", diff --git a/src/app/services/attachment/attachment.service.ts b/src/app/services/attachment/attachment.service.ts index 987badf..9d2a53d 100644 --- a/src/app/services/attachment/attachment.service.ts +++ b/src/app/services/attachment/attachment.service.ts @@ -9,6 +9,11 @@ export class AttachmentService { constructor(private http: HttpClient) { } cloudImageUpload(fileDetails:any, uploadUrl:any) { - return this.http.put(uploadUrl.signedUrl, fileDetails) -} + const option = { headers: { + "skipInterceptor": "true", + "Content-Type": "multipart/form-data", + "Access-Control-Allow-Origin": "*" + }} + return this.http.put(uploadUrl.signedUrl, fileDetails, option) } +} \ No newline at end of file diff --git a/src/app/services/interceptor/api.interceptor.ts b/src/app/services/interceptor/api.interceptor.ts index 99bac41..fc97657 100644 --- a/src/app/services/interceptor/api.interceptor.ts +++ b/src/app/services/interceptor/api.interceptor.ts @@ -46,12 +46,9 @@ export class ApiInterceptor implements HttpInterceptor { return req.clone({ setHeaders: { 'X-auth-token': `bearer ${token}` } }); - } else if (req.url.includes('storage.googleapis.com')) { + } else if (req.headers.has("skipInterceptor")) { return req.clone({ - setHeaders: { - "Content-Type": "multipart/form-data", - "Access-Control-Allow-Origin": "*" - } + headers: req.headers.delete("skipInterceptor") }); } else { return req.clone({