Skip to content

Commit 548ccf8

Browse files
authored
Merge pull request DSpace#2162 from TexasDigitalLibrary/DS-8668
DS-8668: adds check for HTTP 413 status code when importing an SAF file
2 parents e986f10 + 3a7ab49 commit 548ccf8

2 files changed

Lines changed: 11 additions & 3 deletions

File tree

src/app/admin/admin-import-batch-page/batch-import-page.component.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,15 @@ export class BatchImportPageComponent {
9797
this.router.navigateByUrl(getProcessDetailRoute(rd.payload.processId));
9898
}
9999
} else {
100-
const title = this.translate.get('process.new.notification.error.title');
101-
const content = this.translate.get('process.new.notification.error.content');
102-
this.notificationsService.error(title, content);
100+
if (rd.statusCode === 413) {
101+
const title = this.translate.get('process.new.notification.error.title');
102+
const content = this.translate.get('process.new.notification.error.max-upload.content');
103+
this.notificationsService.error(title, content);
104+
} else {
105+
const title = this.translate.get('process.new.notification.error.title');
106+
const content = this.translate.get('process.new.notification.error.content');
107+
this.notificationsService.error(title, content);
108+
}
103109
}
104110
});
105111
}

src/assets/i18n/en.json5

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3257,6 +3257,8 @@
32573257

32583258
"process.new.notification.error.content": "An error occurred while creating this process",
32593259

3260+
"process.new.notification.error.max-upload.content": "The file exceeds the maximum upload size",
3261+
32603262
"process.new.header": "Create a new process",
32613263

32623264
"process.new.title": "Create a new process",

0 commit comments

Comments
 (0)