How do I get upload file name after click the submit button. Below in the file upload field.
<input class="required-field" type="file" value="" name="cover_image">
I've tried with below but it not get the value.
var filename = $("[name='cover_image']", form).val();
Here I don't have ID fro the input filed but is it possible to get upload file name?
form
? a var or the actualform
tag. – Jai Jun 25 at 7:41form
for get the value in filed. ex: for get text field value I've usedvar magcode = jQuery("[name='magcode']", form).val();
– miuranga Jun 25 at 7:45form
is a variable, we don't know what its value is. – billyonecan Jun 25 at 7:49