Pass additional field such as caption with each file/image dynamically , how we can pass the caption with each file in reactive form? #985

Open
opened 2018-02-22 11:46:07 +00:00 by atish23 · 3 comments
atish23 commented 2018-02-22 11:46:07 +00:00 (Migrated from github.com)
No description provided.
elialber commented 2018-03-10 19:27:30 +00:00 (Migrated from github.com)

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

public uploader:FileUploader = new FileUploader({ url: URL, method: "POST", additionalParameter: { otherField: { 'caption':bla bla bla', 'order':4 } } });
webchetan commented 2018-05-04 15:35:45 +00:00 (Migrated from github.com)

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

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
MaticDiba commented 2022-03-04 08:17:22 +00:00 (Migrated from github.com)

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

@webchetan have maybe managed to solve this issue with reactive form?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dc/ng2-file-upload#985