ng2-file-upload icon indicating copy to clipboard operation
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?

Open atish23 opened this issue 7 years ago • 3 comments

atish23 avatar Feb 22 '18 11:02 atish23

public uploader:FileUploader = new FileUploader({ url: URL, method: "POST", additionalParameter: { otherField: { 'caption':bla bla bla', 'order':4 } } });

elialber avatar Mar 10 '18 19:03 elialber

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 avatar May 04 '18 15:05 webchetan

@webchetan have maybe managed to solve this issue with reactive form?

MaticDiba avatar Mar 04 '22 08:03 MaticDiba