Dynamically create FileUploader #1063
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hi
I need to use single file upload property multiple times in a single page. I am reading data from database and I need to upload multiple files like "driving license", "personal photo" etc, these datas comes from database.
<div *ngFor="let form of customForms; let i = index" style="width:100%"> <div fxLayout="row"> <div style="width:15%">{{form.name}} *** {{form.extentionsList}}</div> <div style="width:15%" *ngIf="form.mandatory" [id]="form.inputId" style="color:red">(*)</div> </div> <input type="file" name="{{ 'file' + i+1}}" id="{{ 'file' + i+1}}" #fileInput{{i+1}} ng2FileSelect [uploader]="uploader" class="inputfile" (change)="OnContentChange($event)"/>when I upload files, the files dublicates the files for each area. So how can I create FileUploader dynamically so I can use it like this
[uploader]="dynamicallyCreatedUploader"I have the same problem.. i solved it like this..
......
backend..
controller
@keithics Could you please provide
this.getUploaderFields();this code sample. If possible could you please create a gist of all the codes involved related to Dynamic FileUploader .. including html, ts, service, css