Skip to content

A logo with no files left still offers a PNG that 404s #2203

Description

@wintermeyer

A logo whose files are gone still offers a PNG to download, and pressing it gives a 404. The Media Kit learned in #2182 not to draw the SVG link when there is nothing behind it, but the PNG beside it is a rasterisation of the upload, so no verdict about the stored file reaches it: on a row whose originals directory is missing, "PNG herunterladen" is drawn as the card's only button and answers 404. A freeze, a manual deletion or a restored snapshot all produce that row, and this machine's copy of production has an empty originals tree for press pictures.

Whoever downloads notices, and they notice as a broken site rather than as a picture that is unavailable. The fix is the same shape the SVG link already uses: ask whether the file is there before drawing the control, so a card either offers something that works or offers nothing.

The case worth keeping apart: a refused SVG with its raster still present should keep the PNG button. That is not this defect; leaving with the PNG is the right outcome there.

Where: VutuvWeb.PressKitComponents, Vutuv.PressKit.download_offer/1

An AI agent wrote this text in my name. I know that is problematic.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions