Files
bambuddy/backend
maziggy 2d24ef4bd8 Check the card before writing a print off as internal-storage-only (issue #2856)
A print's dispatch says where the printer put the sliced file:
    ftp://<name> for external storage, brtc://emmc/<name> for internal. Since
    that there is then no file to find at any path.

    That is where the printer chose to put it, which is not the same as where
    port 990 can read it. The reporter's H2D - firmware 01.03.00.00, card in
    the slot - reports brtc://emmc and keeps the same file under /cache: his
    log has every print from 08-12 downloading from there, 19 MB included,
    until the skip landed and two days of archives came out as a name and
    nothing else. #2780's P2S and H2C really did 550 on every path, so both
    are true and the URL alone cannot tell them apart.

    So ask the printer rather than the model. The dispatch names the exact
    file, which turns the question into one connection walking five
    directories - against the sweep's ~110, which is the cost that made
    skipping worth doing. A hit archives normally and is shared with the
    cover endpoint; a miss keeps #2780's fallback archive and its reason, so
    the archives banner still explains itself. Not probed when the printer
    reports an empty slot, or while its file service is in TLS cool-off:
    both have already answered the question.

    The connection diagnostic asked the same question off the URL and warned
    that the last print was out of reach. On this reporter's printer that
    warning would have sent him to a setting that was already right, so it
    now probes too - by directory listing, since the file it is asking about
    can be tens of megabytes and the answer is a yes or a no. Capped at 6s to
    stay inside the support bundle's per-printer budget, and "could not
    check" leaves the warning standing.

    The probe filename arrives over MQTT and becomes both a remote path and a
    local temp filename, so names carrying separators, traversal or control
    characters are declined rather than cleaned.
2026-08-17 15:51:22 +02:00
..