mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +00:00
add message for when user try to upload file with maliciose script
This commit is contained in:
@@ -232,6 +232,7 @@ export class AuthService {
|
|||||||
window['e'] = e
|
window['e'] = e
|
||||||
console.error('BeforesendAtachment', e)
|
console.error('BeforesendAtachment', e)
|
||||||
message.uploadingFile = false
|
message.uploadingFile = false
|
||||||
|
this.httpErroHandle.httpStatusHandleUploadFile(e);
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -252,6 +253,7 @@ export class AuthService {
|
|||||||
window['e'] = e
|
window['e'] = e
|
||||||
console.error('BeforesendAtachment', e)
|
console.error('BeforesendAtachment', e)
|
||||||
message.uploadingFile = false
|
message.uploadingFile = false
|
||||||
|
this.httpErroHandle.httpStatusHandleUploadFile(e);
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,13 +50,24 @@ export class HttpErrorHandle {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async httpStatusHandleUploadFile(error) {
|
||||||
|
switch (error.status
|
||||||
|
) {
|
||||||
|
case 403:
|
||||||
|
this.toastService._badRequest('O ficheiro que .')
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
async loginHttpStatusHandle(error) {
|
async loginHttpStatusHandle(error) {
|
||||||
switch (error.status
|
switch (error.status
|
||||||
) {
|
) {
|
||||||
case 0:
|
case 0:
|
||||||
const result = await this.backgroundService.offline()
|
const result = await this.backgroundService.offline()
|
||||||
if (result) {
|
if (result) {
|
||||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
this.toastService._badRequest('O ficheiro que tentou enviar contém possível script malicioso')
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user