Bug 238668

Summary: Adding ".stl" files to a <input type=file> transforms it into ".bmp"
Product: WebKit Reporter: Sunny <sunny>
Component: FormsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: akeerthi, cdumez, jens.viebig, sabouhallawa, thorton, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: Safari 15   
Hardware: Mac (Intel)   
OS: macOS 12   
See Also: https://bugs.webkit.org/show_bug.cgi?id=239001

Description Sunny 2022-04-01 09:55:28 PDT
If a file input has an "accept" attribute with both ".stl" and ".bmp" file extensions (whatever the order):

    <input type="file" accept=".stl,.bmp">

Then, when selecting a file called "my-file.stl", it shows up as a "tempImageiHA7wr.bmp" instead.

- Input to test here: https://dev.sunfox.org/safari-stl/
- STL example file: https://dev.sunfox.org/safari-stl/cults-logo.stl
Comment 1 Alexey Proskuryakov 2022-04-06 09:12:41 PDT
Seems like exact match should always win indeed, and we shouldn't be attempting conversion.
Comment 2 Radar WebKit Bug Importer 2022-04-06 09:12:52 PDT
<rdar://problem/91357479>
Comment 3 Jens Viebig 2022-05-04 01:19:43 PDT
We also saw this behavior with other combinations for example:

<input type="file" accept=".ts,.m2p,.jpg">
<input type="file" accept=".ts,.m2p,image/jpeg">

When adding a .ts or .m2p they will be recognized as temp*.jpg


The following "accept" work as expected:

<input type="file" accept=".ts,.m2p">
<input type="file" accept=".ts,.m2p,image/*">
Comment 4 Aditya Keerthi 2023-06-23 08:39:05 PDT

*** This bug has been marked as a duplicate of bug 237219 ***