Closed Bug 1772989 Opened 3 years ago Closed 3 years ago

File .jfif is converted to .jpg while downloading

Categories

(Firefox :: File Handling, defect)

Firefox 101
defect

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: yulia.furta, Unassigned, NeedInfo)

References

(Blocks 1 open bug)

Details

(Keywords: webcompat:platform-bug)

Attachments

(1 file)

Attached image sample1 (11).jfif

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36

Steps to reproduce:

Download file (I did this way):
const blob = new Blob([data], { type: 'image/pjpeg' });
const uri = URL.createObjectURL(blob);
var link = document.createElement("a");
link.download = documentName;
link.href = uri;
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
URL.revokeObjectURL(objectURL);

or using FileSaver:

const blob = new Blob([data], { type: 'image/pjpeg' });
saveAs(blob, documentName);

Actual results:

File downloaded with .jpg extension

Workaround:
Provide 'application/octet-stream' type to blob object
const blob = new Blob([data], { type: 'application/octet-stream' });

Expected results:

Expected results:

The file is downloaded in original format .jfif

The Bugbug bot thinks this bug should belong to the 'Firefox::File Handling' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → File Handling

What version of Firefox are you seeing this on, and on what operating system?

Flags: needinfo?(yulia.furta)
See Also: → 1772988
Blocks: 1778322

I could not reproduce the issue on Win10/Ubuntu20.4 using Beta 102.0b1 (build without fix). I used a clean profile and a profile with the file handler from bug 1772140.
Can you please add the handler.json from your profile, in order to reproduce it?
If handler file can not be attached can you please confirm if issue is still reproducing on latest Beta 103.0b8 (https://archive.mozilla.org/pub/firefox/candidates/103.0b8-candidates/build1/) and Nightly 104.0a1(https://archive.mozilla.org/pub/firefox/nightly/2022/07/2022-07-13-09-38-28-mozilla-central/)? Also what OS are you using?
There were some fixes made on bug 1773907 that could be fixing your issue.

File handler can be found: go to about:suport ->Profile Folder ->Open folder -> look for 'handlers.json'.

Without a response from the reporter we are unlikely to be able to do anything here.

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: