ng2-file-upload
ng2-file-upload copied to clipboard
Pass additional field such as caption with each file/image dynamically , how we can pass the caption with each file in reactive form?
public uploader:FileUploader = new FileUploader({ url: URL, method: "POST", additionalParameter: { otherField: { 'caption':bla bla bla', 'order':4 } } });
This seems to work, BUT how do I get the NgForm input box value for multiple files and pass it on to the uploader?
so in my html I have some like this below:
<form #uploadForm="ngForm" id="uploadForm">
<input type="text" [(ngModel)]="description" name="description" />
</form>
Now I need to pass this value to the otherField. How do you achieve this for multiple image uploads at once. Currently as I typw in that input box.. when uploading multiple pictures the input box value fills with same text...
Please advise. Thank you
@webchetan have maybe managed to solve this issue with reactive form?