0
if(//safari 5.1.7){
  //use jquery change to single file only

}

<input type='file' name="image[]"  multiple="multiple"/>

I have an input file can upload multiple files, but I need a use jquery change to single if safari 5.1.7

because Safari 5.1.7 have bug when I try to upload multiple files, single file is ok

Ben
  • 2,562
  • 8
  • 37
  • 62
  • how is that bug? there is a deprecated feature called `$.browser` may help you. – King King May 25 '14 at 14:17
  • possible duplicate of http://stackoverflow.com/questions/5899783/detect-safari-using-jquery-browser-detection – Amit Soni May 25 '14 at 14:18
  • i'm not asking detect safari, i'm asking how to change input file from multiple to single – Ben May 25 '14 at 14:19
  • @BenWong it's simply by removing the `multiple` attribute, the default is single. – King King May 25 '14 at 14:20
  • do I need to change 'image[]' to 'image'? please put it in answer so I can close this question – Ben May 25 '14 at 14:21
  • 3
    `$('input[type="file"]').prop("multiple", false)`? Is that what you're asking? But who uses that obsolete Safari version nowadays? – nietonfir May 25 '14 at 14:23

0 Answers0