0

i have to upload ".csv" file only, i am writing cfinput tag like this-

cfinput type="file"  name="mycsvfile" accept="application/csv" 

but above cfinput tag is not functioning properly, it is accepting other extensions also. what will be the correct cfinput code to browse ".csv" file only.

Thanks
Yugal

Yugal
  • 1,635
  • 8
  • 21
  • 30

1 Answers1

0

If you check this thread, you'll see that the accept attribute for the input tag is ignored by all the major browsers. You need to do the check when the file is uploaded anyway, so don't rely on the input tag to filter this for you.

Community
  • 1
  • 1
Dan Short
  • 9,598
  • 2
  • 28
  • 53