Bug 238668 - Adding ".stl" files to a <input type=file> transforms it into ".bmp"
Summary: Adding ".stl" files to a <input type=file> transforms it into ".bmp"
Status: RESOLVED DUPLICATE of bug 237219
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: Safari 15
Hardware: Mac (Intel) macOS 12
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-04-01 09:55 PDT by Sunny
Modified: 2023-06-23 08:39 PDT (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***