Hi
Thanks for writing this example with Django. How would you change the code if you need to add a 'description' field for each file that you upload. I changed the upload template to have
<tr class="template-upload{{if error}} ui-state-error{{/if}}">
<td class="preview"></td>
<td class="name">${name}</td>
<td class="size">${sizef}</td>
{{if error}}
<td class="error" colspan="2">Error:
{{if error === 'maxFileSize'}}File is too big
{{else error === 'minFileSize'}}File is too small
{{else error === 'acceptFileTypes'}}Filetype not allowed
{{else error === 'maxNumberOfFiles'}}Max number of files exceeded
{{else}}${error}
{{/if}}
</td>
{{else}}
<td><input type="text" name="description"/></td>
<td class="progress"><div></div></td>
<td class="start"><button>Start</button></td>
{{/if}}
<td class="cancel"><button>Cancel</button></td>
</tr>
The field renders correctly with each file row but the POST data that reaches the server never contains the additional field.
I read the jquery-file-upload docs and found out about formData but could not figure out how to initialize it with different data for each row (file).
Any help will be appreciated.
Jai
Hi
Thanks for writing this example with Django. How would you change the code if you need to add a 'description' field for each file that you upload. I changed the upload template to have
The field renders correctly with each file row but the POST data that reaches the server never contains the additional field.
I read the jquery-file-upload docs and found out about formData but could not figure out how to initialize it with different data for each row (file).
Any help will be appreciated.
Jai