WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
244666
Drag / drop file conversion renames the files to "tempImage[A-Za-z0-9]{6}" for some mime-types
https://bugs.webkit.org/show_bug.cgi?id=244666
Summary
Drag / drop file conversion renames the files to "tempImage[A-Za-z0-9]{6}" fo...
Flavian Hautbois
Reported
2022-09-01 06:49:17 PDT
# Overview This bug was likely introduced by
bug 212482
. There is a bug in this implementation where at least files with extensions .dng (image/x-adobe-dng , image/x-canon-cr2) and .cr2 keep a temporary name "tempImage[A-Za-z0-9]{6}". This name is only [attributed in ImageUtiliesCG.cpp](
https://github.com/WebKit/WebKit/blob/cb8ffd4609c68a076d701b85b0c41d3743af5a0c/Source/WebCore/platform/graphics/cg/ImageUtilitiesCG.cpp#L72
). # Steps to reproduce 1. Open this link with Safari:
https://jsfiddle.net/6nzs5u1a/
2. Download `sample1.cr2` from
https://filesamples.com/formats/cr2
3. Drag and drop this file into the input field of the jsfiddle # Actual result Observe that the `filename` element turns to `tempImageXXXXX.png`. # Expected result Observe that the `filename` element turns to `sample1.png`. Notes: - When using HEIC as an input format, the `filename` reverts to the original file name with a new extension - When using .DNG files, the unexpected behaviour with tempImage still happens. # Build Date & Hardware Safari Version 15.4 (17613.1.17.1.13) on macOS 12.3.1 # Additional Builds and Platforms It does not happen on Google Chrome 104 # Additional enquiries I suspect that after the temporary file is created, it must be renamed to the previous name but with the right file extension. I haven't managed to find the line of code that does this, but I think this is where the bug happens.
Attachments
Add attachment
proposed patch, testcase, etc.
Flavian Hautbois
Comment 1
2022-09-01 06:50:30 PDT
Additionally, I've made a video of the reproduction steps:
https://youtu.be/6AsmSbjvc6c
Flavian Hautbois
Comment 2
2022-09-01 07:05:23 PDT
There is also one Stackoverflow question about this bug:
https://stackoverflow.com/a/73570703/1074116
It appears that files other than images are attempted to be converted, and end up with this tempImage name.
Radar WebKit Bug Importer
Comment 3
2022-09-08 06:50:21 PDT
<
rdar://problem/99696035
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug