Skip to content

Commit c29e8eb

Browse files
authored
Handle HTTP 201 'Created' status code
1 parent 44e5b5f commit c29e8eb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

projects/angular-file-uploader/src/lib/angular-file-uploader.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ export class AngularFileUploaderComponent implements OnInit, OnChanges {
211211
xhr.onreadystatechange = evnt => {
212212
//console.log("onready");
213213
if (xhr.readyState === 4) {
214-
if (xhr.status !== 200) {
214+
if (xhr.status !== 200 && xhr.status !== 201) {
215215
isError = true;
216216
this.progressBarShow = false;
217217
this.uploadBtn = false;
@@ -316,4 +316,4 @@ export class AngularFileUploaderComponent implements OnInit, OnChanges {
316316
theme?: string;
317317
hideProgressBar?: boolean;
318318
}
319-
*/
319+
*/

0 commit comments

Comments
 (0)