[Trunk|Admin]: File size limit on curators photo.
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-admin-portal/trunk@56252 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
43389e85f2
commit
bfe739e453
|
@ -45,6 +45,9 @@
|
|||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-margin-small-top uk-text-warning">
|
||||
Maximum photo resolution is 256x256 pixels.
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr *ngIf="curator.bio != null">
|
||||
|
|
|
@ -29,6 +29,7 @@ export class CuratorComponent implements OnInit {
|
|||
public properties: EnvProperties = null;
|
||||
|
||||
private file: File = null;
|
||||
private maxsize: number = 200*1024;
|
||||
private enabled = true;
|
||||
private deletePhoto =false;
|
||||
|
||||
|
@ -165,6 +166,9 @@ export class CuratorComponent implements OnInit {
|
|||
if (this.file.type !== 'image/png' && this.file.type !== 'image/jpeg') {
|
||||
this.handleUpdateError('You must choose a file with type: image/png or image/jpeg!', null);
|
||||
this.file = null;
|
||||
} else if (this.file.size > this.maxsize) {
|
||||
this.handleUpdateError("File exceeds size's limit! Maximum resolution is 256x256 pixels.", null);
|
||||
this.file = null;
|
||||
} else {
|
||||
this.updateErrorMessage = '';
|
||||
const reader = new FileReader();
|
||||
|
|
|
@ -31,10 +31,10 @@
|
|||
"h2020Guidlines" : "https://www.openaire.eu/oa-publications/h2020/open-access-in-horizon-2020",
|
||||
"ercGuidlines" : "http://erc.europa.eu/sites/default/files/document/file/ERC_Open_Access_Guidelines-revised_2014.pdf",
|
||||
"helpdesk" : "https://www.openaire.eu/support/helpdesk",
|
||||
"uploadService" : "http://mpagasas.di.uoa.gr:8000/upload",
|
||||
"downloadUrl" : "http://mpagasas.di.uoa.gr:8000/download",
|
||||
"deleteUrl" : "http://mpagasas.di.uoa.gr:8000/delete",
|
||||
"tinyUrl": "http://mpagasas.di.uoa.gr:8000/tiny?url=",
|
||||
"uploadService" : "http://mpagasas.di.uoa.gr:8001/upload",
|
||||
"downloadUrl" : "http://mpagasas.di.uoa.gr:8001/download",
|
||||
"deleteUrl" : "http://mpagasas.di.uoa.gr:8001/delete",
|
||||
"tinyUrl": "http://mpagasas.di.uoa.gr:8001/tiny?url=",
|
||||
|
||||
"vocabulariesAPI" :"https://beta.services.openaire.eu/provision/mvc/vocabularies/",
|
||||
|
||||
|
|
Loading…
Reference in New Issue