Reputation: 2085
I have a web application and most of the users use IE 11 there is no problem with multiply file upload. My problem is that some users use IE 9 and older (HTML5 input type file's multiple attribute not working in IE?) there I cant use it.
I need something like "Conditional comments" for it, but with it, it wont work because IE11 ignores it.
In need something in my html like this:
if(Multiupload supports){
<multiply input tag>
}else{
<single input tag>
}
Is there a way to choose the upload method browser specific?
Thank you for your help
Upvotes: 1
Views: 160
Reputation: 6894
If you're not using something that will allow you to write conditional logic in HTML (such as PHP, AngularJS, Handlebars, ect...) then you will not be able to write a conditional statement based off of a Multiupload
variable like the example you provided.
The Pure HTML Way
Since we know that the multiple upload will not work in Internet Explorer 9 or 8, you can use IE Conditional Comments to switch between single or multiple upload, depending on the browser version.
<!--[if (!IE 8)|(!IE 9)]><!-->
<p>Not IE8, or IE9. Multiple Upload</p>
<!--<![endif]-->
<!--[if (IE 8)|(IE 9)]>
<p>IE8, or IE9. Single Upload</p>
<![endif]-->
This will show the single upload for IE 9 and lower, and the multiple upload for everything else.
Upvotes: 2