Skip to content

Commit

Permalink
Expose xhr response status in UploadFile object
Browse files Browse the repository at this point in the history
  • Loading branch information
oleosjo authored and jkuri committed Aug 15, 2017
1 parent 5b447cb commit 795b5f7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ngx-uploader/classes/ngx-uploader.class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export interface UploadFile {
type: string;
progress: UploadProgress;
response?: any;
responseStatus?: number;
sub?: Subscription | any;
nativeFile?: File;
}
Expand Down Expand Up @@ -249,6 +250,8 @@ export class NgUploaderService {
}
};

file.responseStatus = xhr.status;

try {
file.response = JSON.parse(xhr.response);
} catch (e) {
Expand Down

0 comments on commit 795b5f7

Please sign in to comment.