Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upload test #525

Merged
merged 2 commits into from
Apr 20, 2012
Merged

upload test #525

merged 2 commits into from
Apr 20, 2012

Conversation

mirceageorgescu
Copy link

I needed a quick way to find out if the browser supports file upload so I did this test. On iPad and iPhone this test returns false as input["type=file"] are disabled.

I thought this could be useful to someone as I couldn't find anything like this on community add-ons.

@paulirish
Copy link
Member

this is nice. i think someone else was asking about this..

@mirceageorgescu
Copy link
Author

Yes, I got the idea of checking if the input is disabled from here #497 but haven't seen it implemented so I gave it a shot. Hope it helps.

@paulirish
Copy link
Member

can you add a comment to the top of the file adding a note on why you'd want to test this.

most people will just see the source and be like "uhhhh.. file upload?"

thanks

@mirceageorgescu
Copy link
Author

Done.

@paulirish
Copy link
Member

delightful. thxxx

paulirish added a commit that referenced this pull request Apr 20, 2012
@paulirish paulirish merged commit 1b79e88 into Modernizr:master Apr 20, 2012
@azproduction
Copy link

Unfortunately, this test does not work on Android < 2.1 http://jsfiddle.net/Rgq5N/2/ Any idea how properly detect that feature without matching version?

var parts = /Android\s([0-9\.]+)/.exec(navigator.userAgent);
if (parts && parts[1] <= "2.1") {
    return false;
}

@mirceageorgescu
Copy link
Author

Sorry, I have no idea.

patrickkettner pushed a commit to patrickkettner/Modernizr that referenced this pull request Feb 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants