Merge pull request #8814 from netchampfaris/file-uploader-403
fix(fileuploader): Handle 403 status code
This commit is contained in:
commit
d74faae430
1 changed files with 7 additions and 0 deletions
|
|
@ -367,6 +367,13 @@ export default {
|
|||
if (this.on_success) {
|
||||
this.on_success(file_doc, r);
|
||||
}
|
||||
} else if (xhr.status === 403) {
|
||||
let response = JSON.parse(xhr.responseText);
|
||||
frappe.msgprint({
|
||||
title: __('Not permitted'),
|
||||
indicator: 'red',
|
||||
message: response._error_message
|
||||
});
|
||||
} else {
|
||||
file.failed = true;
|
||||
let error = null;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue