feat: a file's type comes from its first bytes, not its name (Dropstar's rule D-13)
All checks were successful
Build and deploy / Validate source (push) Successful in 7s
Build and deploy / Integration suite on a real stack (push) Successful in 3m37s
Build and deploy / Secret scan and release gate (push) Successful in 7s
Build and deploy / Publish images (push) Successful in 1m11s
All checks were successful
Build and deploy / Validate source (push) Successful in 7s
Build and deploy / Integration suite on a real stack (push) Successful in 3m37s
Build and deploy / Secret scan and release gate (push) Successful in 7s
Build and deploy / Publish images (push) Successful in 1m11s
The Site reads the first bytes when a file is chosen and renames it to its real extension: a .cdr that is a PDF is measured and priced as a PDF, without the manual charge; a JPG called .png is refused, naming the file. The scan does the same on the server and stores the real name, so every decision that reads the name follows the content. A name its content agrees with stays (an .ai is a PDF inside but is still handled by hand). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -196,6 +196,20 @@ amount is the client's to set. The Site reads it from `/api/session` and shows
|
||||
it before checkout (product page, help text, price table);
|
||||
`app/core/pricing.py` charges it.
|
||||
|
||||
What a file is comes from its first bytes, never from its name (Dropstar's
|
||||
rule D-13, 2026-10-26; a third of their ".cdr" files are PDFs). The Site reads
|
||||
the first bytes when a file is chosen and renames it to its real extension
|
||||
(`nomeReal` in web/site-upload.js): a ".cdr" that is a PDF becomes ".pdf" and
|
||||
is measured and checked as a PDF, without the manual charge; a JPG called
|
||||
".png" is refused as a JPG, naming the file. The server does the same when it
|
||||
scans an upload (`real_name` in app/scanning.py) and stores the real name, so
|
||||
every later decision that reads the name (the manual charge, the JPG refusal,
|
||||
the grade, the original used as its own print file, the folder file names)
|
||||
follows the content even if the browser was bypassed. A name its content
|
||||
agrees with stays: an Illustrator ".ai" is a PDF inside but is still handled
|
||||
by hand, since one saved without PDF content prints a placeholder page. A file
|
||||
too large for the antivirus passes when its content is any accepted format.
|
||||
|
||||
## Freight
|
||||
|
||||
**Current (2026-10-15):** the cart quotes every carrier configured at once and
|
||||
@@ -448,13 +462,14 @@ Still to do (2026-10-26):
|
||||
money stays as the customer's credit in their financial control (D-15, the
|
||||
Kanban's cancel text says so, nothing on the Site); the Kanban keeps
|
||||
deleting Finalizado files after 30 days; the footer gets the white spot.
|
||||
- Still open from the internal rules (docs received 2026-10-26): file type by
|
||||
its first bytes (D-13), every order's origin and a manual order entry in
|
||||
the Kanban (D-21, D-35; also how orders paid with credit come in), the
|
||||
and the rework register (D-02 to D-04). Done 2026-10-27: the folders catch
|
||||
up on what passed while the Kanban computer was off, and time in
|
||||
"Aguardando contato" no longer counts in Números' time figures (D-38; each
|
||||
wait is kept in dtf_local.contact_waits, from mark to clear).
|
||||
- Still open from the internal rules (docs received 2026-10-26): every
|
||||
order's origin and a manual order entry in the Kanban (D-21, D-35; also how
|
||||
orders paid with credit come in), and the rework register (D-02 to D-04).
|
||||
Done 2026-10-27: the folders catch up on what passed while the Kanban
|
||||
computer was off, time in "Aguardando contato" no longer counts in Números'
|
||||
time figures (D-38; each wait is kept in dtf_local.contact_waits, from mark
|
||||
to clear), and a file's type comes from its first bytes (D-13, see the
|
||||
commercial rules).
|
||||
- Settled on 2026-10-26: the DTF SITE category (986932924, CATEGORY in app/tiny.py),
|
||||
the white spot also under the print PDF's footer (nothing to change here),
|
||||
and the montador's order format (customer, files, product, the batch with
|
||||
|
||||
Reference in New Issue
Block a user