entfernen Ich habe die browserfile Eingang und Taste, um das Logo zu laden:wie kann ich Avatar in Winkel 2
<div class="col-md-2">
<form #uploadLogo="ngForm" enctype="multipart/form-data" id="fileForm">
<input type="file"
class="form-control"
nodisable
name="file"
id="companyLogo"
(change)="onChange($event)">
</form>
<span class="thumbnail"><img *ngIf="data.companyObj.imagePath"
[src]="url + '/static/logo/' + data.companyObj.imagePath" height="50px" width="250px"/></span>
</div>
<div class="col-md-3">
<button class="btn btn-primary" (click)="uploadCompanyLogo()">{{ 'BASEDATA.UPLOAD' | translate }}</button>
und hier ist die TS-Datei:
public uploadCompanyLogo() {
if(this.file == null){
this.fileUpload.uploadFile('/company-logo', 'companyLogo').subscribe(response => {
this.data.companyObj.imagePath = response.body.defaultLogo;
this.sharedService.setUrl(this.data.companyObj.imagePath);
})
wie kann ich diese entfernen mit removefunction und null sein
danke, ich möchte nur eine andere Schaltfläche erstellen (klick) = "removeCompanyLogo() und dann in TS-Datei zum Erstellen der Funktion public removeCompanyLogo() –