Closed Bug 1872310 Opened 11 months ago Closed 10 months ago

Cannot Save JSON when opened from a blob Object URL

Categories

(Firefox :: File Handling, defect)

Firefox 121
Desktop
Unspecified
defect

Tracking

()

RESOLVED DUPLICATE of bug 1872307

People

(Reporter: websitemakingguy+1, Unassigned)

References

Details

Attachments

(1 file)

Attached image failed.png

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:121.0) Gecko/20100101 Firefox/121.0

Steps to reproduce:

Create a JSON blob URL in JavaScript.

URL.createObjectURL(new Blob([JSON.stringify({test: 1})], {type: "application/json"})) 

When I open the URL created in a new window, the data displays correctly.

Actual results:

However, when I click save, the save dialog appears and I enter a name for the file. However, when I click "Save", the download dialog reports the download as "Failed" and the file never saves. Instead I have to manually copy the contents of the JSON to a text editor and then save the file that way.

Expected results:

The file should download successfully.

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
See Also: → 1872307

The severity field is not set for this bug.
:Gijs, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(gijskruitbosch+bugs)

I can also reproduce this issue by opening a local JSON file in the browser and attempting to save it. It will fail. This appears to be a duplicate of bug 1872307 as it does not matter whether the JSON blob is created as mentioned in the description. If you believe it to be a different and separate issue, please try to explain why. Thank you.

Status: UNCONFIRMED → RESOLVED
Closed: 10 months ago
Duplicate of bug: 1872307
Flags: needinfo?(hello)
Hardware: Unspecified → Desktop
Resolution: --- → DUPLICATE
Flags: needinfo?(hello)
Flags: needinfo?(gijskruitbosch+bugs)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: