[Webkit-unassigned] [Bug 244666] New: Drag / drop file conversion renames the files to "tempImage[A-Za-z0-9]{6}" for some mime-types

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Sep 1 06:49:17 PDT 2022


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

            Bug ID: 244666
           Summary: Drag / drop file conversion renames the files to
                    "tempImage[A-Za-z0-9]{6}" for some mime-types
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Major
          Priority: P2
         Component: Images
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: f.hautbois at gmail.com
                CC: sabouhallawa at apple.com

# 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.

-- 
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/20220901/ceae0b63/attachment.htm>


More information about the webkit-unassigned mailing list