Describe the bug
Some uploaded PNG images, though functioning totally normally within AnyType, will download a JSON representation of the object with a PNG extension when you use the Download button, rather than the actual image file. The same JSON is returned if you query the URI that normally returns the image (e.g. 127.0.0.1:1040/file/id). It doesn’t appear to ever happen for JPEG files.
The JSON notably features an impossible creation time, e.g.
{"created":"0001-01-01T00:00:00Z", "name":"!icon_bookmark.png", "extension":".png", "width":200, "height":200, "format":"png", "iso":0, "exposure_time":"", "f_number":0}
I’ve noticed that it will consistently happen with the same PNG files, but not with others, even files that have the same chief attributes (eg 8-bit, RGBA, non-interlaced).
To Reproduce
-
- Insert [this PNG file](https://ryanplant.net/!icon_bookmark.png) into an AnyType draft.
-
- Go to the Image type and select
!icon_bookmark.png
from the list of objects.
- Go to the Image type and select
-
- Click Download.
-
- Use
cat
on the file and see that it’s actually a JSON object.
- Use
Desktop:
- OS: Windows 11 (build 22000.168)
- Version: 0.18.68