Skip to content

Commit

Permalink
#400 added XHR instance when a request already was done, now it's pos…
Browse files Browse the repository at this point in the history
…sible to get response headers.
  • Loading branch information
77bo committed Dec 8, 2017
1 parent 05cf604 commit b62d570
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/ngx-uploader/classes/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export interface UploadFile {
responseStatus?: number;
sub?: Subscription | any;
nativeFile?: File;
rawRequest?: XMLHttpRequest;
}

export interface UploadOutput {
Expand Down
2 changes: 2 additions & 0 deletions src/ngx-uploader/classes/ngx-uploader.class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,8 @@ export class NgUploaderService {
file.response = xhr.response;
}

file.rawRequest = xhr;

observer.next({ type: 'done', file: file });

observer.complete();
Expand Down

0 comments on commit b62d570

Please sign in to comment.