Closed nileshyadav326 closed 7 years ago
Don't think any hacks are needed, check the Dropzone documentation how to do that.
as per the documentation, hidden data will auto submitted. https://github.com/enyo/dropzone/wiki/FAQ#how-to-submit-additional-data-along-the-file-upload
but I want to submit other fields type (i.e text , radio ) data also.
There is also documentation saying that all form inputs are included not just hidden, don't know which is true. Quick look at the code makes me think that all inputs are included, but don't know. Anyway this is more of a question for Dropzone that for this wrapper.
ok I tried this option and able to send the other params
public config2: DropzoneConfigInterface = {
server: 'https://httpbin.org/post',
paramName: 'imageFile1',
sending: function (file, xhr, formData) {
formData.append("insurance_type", 'test'); //name and value
formData.append("insurance_expirationdate", 'tests'); //name and value
}
};
Hi i want to pass extra form data with the file , can u suggest any hack is available . in angular 2 version.