From d255ef180f15d9b140192b724453c34653790e55 Mon Sep 17 00:00:00 2001 From: Jan Kuri Date: Wed, 31 May 2017 11:43:29 +0200 Subject: [PATCH] feat(credentials): withCredentials option --- src/ngx-uploader/classes/ngx-uploader.class.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ngx-uploader/classes/ngx-uploader.class.ts b/src/ngx-uploader/classes/ngx-uploader.class.ts index 46189e47..ef46e37d 100644 --- a/src/ngx-uploader/classes/ngx-uploader.class.ts +++ b/src/ngx-uploader/classes/ngx-uploader.class.ts @@ -50,6 +50,7 @@ export interface UploadInput { data?: { [key: string]: string | Blob }; headers?: { [key: string]: string }; concurrency?: number; + withCredentials?: boolean; } export function humanizeBytes(bytes: number): string { @@ -218,6 +219,7 @@ export class NgUploaderService { }; xhr.open(method, url, true); + xhr.withCredentials = event.withCredentials ? true : false; const form = new FormData(); try {