0

I want to check the file's capacity and extension.

<input type="file" id="fileup['+idx+']"> 
<input type="button" onclick="fileSizeCheck(idx)">

When I have this code, how do I check the extension when adding files and checking the capacity?

0

1 Answer 1

1

You will need to get the file by adding an onchange event handler to the file input. Maybe save that to a variable and then use it in the onclick handler

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.