[Webkit-unassigned] [Bug 190982] New: <input type=file accept=...> does not filter correct file types

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Oct 27 06:34:30 PDT 2018


https://bugs.webkit.org/show_bug.cgi?id=190982

            Bug ID: 190982
           Summary: <input type=file accept=...> does not filter correct
                    file types
           Product: WebKit
           Version: Safari 12
          Hardware: iPhone / iPad
                OS: iOS 12
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Forms
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: webkit.org at wilk.se
                CC: cdumez at apple.com, wenson_hsieh at apple.com

Not possible to specify correct file filter for file open dialog initated in a webpage view on webbrowser on IOS.
The attribute ACCEPT on the HTML element INPUT with TYPE= ”file” is in IOS seems to not be interpreted according to official HTML standard as defined  by W3C:
Fo reference, please see:
https://www.w3.org/TR/2018/SPSD-html401-20180327/interact/forms.html#file-select
https://www.w3.org/TR/2018/SPSD-html401-20180327/types.html#type-content-type

Steps to Reproduce:
1. Create a webpage that may produce a file dialog, like this example:
<html>
<body>
<form action="nopage.html" method="post" enctype="multipart/form-data"> 
<label>File:</label>
<input type="file" accept="image/png,image/jpeg,application/pdf">
<input type="submit" name="submit" value="Submit">
</form>
</body>
<html>

2. View the webpage built on this, or similar, code in a web browser on IOS.
3. Open the file dialog.

Expected Results:
When the file dialog windows is used to browse a file directory containing files of different types, all files of the types PNG, JPG and PDF should be selectable. No other file types should be selectable.
Expected results in general is that selectable file types in a file dialog open from a webpage in this way should be according to the type specified in the accept attribute of the input element with type=file.

Actual Results:
When the file dialog windows is used to browse a file directory containing files of different types, only files of the types PNG ang JPG is selectable.
Actual results in general is that the accept attribute, of the input element with type=file, does not result in the correct file types being selectable.
Alternative actual results is that some combinations of types specified in accept attribute will result in alla files being selectable.

Version/Build:
IOS 11.3.1.
IOS 12.0.1

Configuration/hardware+software:
Mobile Safari on iPhone 7 (model MN952QB/A).
Mobile Safari on iPad Pro 10 inch (model MQF22KN/A).
Firefox Focus on iPhone 7
Firefox Focus on iPad Pro 10 inch.

Possible related bugs (but not the same description/reasoning):
71858  https://bugs.webkit.org/show_bug.cgi?id=71858

This bug earlier reported in radar as:
40394436  https://bugreport.apple.com/web/?problemID=40394436

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20181027/ab80f0d9/attachment-0001.html>


More information about the webkit-unassigned mailing list