Suppose I have an option to upload a file of PDF/Word or may be few more format.
<form >
<input type="file" name="pic" accept="image/*">
<input type="submit">
</form>
Is it possible to retrieve the name of the document and its extension using javascript /jQuery ?
Jack_Tauson_Sr:
Suppose I have an option to upload a file of PDF/Word or may be few more format.
<form >
<input type="file" name="pic" accept="image/*">
<input type="submit">
</form>
Is it possible to retrieve the name of the document and its extension using javascript /jQuery ?
Yes that is stored in a property called files on the file element.
Thanks but could you please elaborate little bit.
Thanks @Paul_Wilkins . Since I am converting the form values into a javascript object, do you think information related to file name and type could be included in the object as well?
system
Closed
June 24, 2018, 2:21am
6
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.