From 0.8.5 (function business-logo of the catalogue, business.logo,
Warda Business, open during the beta; internal/admin/logo.go).
Business → Company logo takes the logo of the company, shown:
- on the company reports and their print;
- on the block page, in place of the Warda shield (asked on
the blocked name itself,
/.well-known/warda-logo; not once the name is unblocked for the device); - on the page where an account asks to unblock a site (Ask to unblock,
see Unblock requests), served by the box
(
GET /api/v1/business/logo/image, every signed-in account).
Every page loads it from the box itself, never from an address elsewhere: the pages allow images of their own origin only.
- Formats: PNG, JPEG or WebP only, never SVG (a drawing that may carry scripts and links): the type is read from the first bytes of the file, before any decoder, and must match what the decoder finds.
- Limits of the file given: 256 KB at most; 4,096 pixels a side at most, and 4,194,304 pixels in all at most (4 million, a quarter of 4096 × 4096, such as 2048 × 2048), both read from the header before the image is decoded (a small file may claim a huge image: 4096 × 4096 in 16 bits a channel would need about 200 MB to decode on a Raspberry Pi). Logos given at the same time are decoded one after the other.
- Drawn again by the box: only its pixels are kept — no metadata (place, camera, author, embedded profiles, text) — reduced to fit 640 × 320 pixels (twice the size it is shown at, for screens of high density), kept in PNG (in JPEG for a photo given in JPEG), 512 KB at most. The page shows its size, weight and date ("640 × 213 pixels, 18 KB, since …").
- Kept in the meta table (
business_logo): in the backups, and given to the secondary of a pair with the rest of the configuration. - After the beta, only with Warda Business: a box without it shows no logo and cannot set one (402), the image kept for the return of the plan.
Administration log: business.logo (image/png 640×213, 18234 bytes, or
removed). API (the system read or written): GET /api/v1/business/logo
(set, type, width, height, bytes, updated, max_bytes,
max_pixels; never the image), PUT /api/v1/business/logo {"data": "<the file in base64>"}, DELETE /api/v1/business/logo.