Bug: /v1/digitize docstring says PNG/JPG only but CanvasArea UI accepts SVG+PNG+JPEG+BMP #11

Closed
opened 2026-08-27 15:30:11 +00:00 by Mark · 0 comments
Owner

Summary

Contract drift between frontend and backend.

  • src/components/workspace/CanvasArea.tsx:276 → accept="image/png,image/jpeg,image/svg+xml,image/bmp"
  • app.py:181-184 docstring → "Accepts multipart/form-data with: image — binary PNG or JPG"

If a user drops an SVG via the UI today, the backend either silently rasterizes or rejects with 422 invalid_image. The UI is overpromising.

Suggested fix

Decide: either (a) extend /v1/digitize to accept SVG (the engine already has SVG path logic), or (b) update the UI accept list to match the backend. Update the docstring either way.

Severity

LOW — confusing, not breaking.

## Summary Contract drift between frontend and backend. - `src/components/workspace/CanvasArea.tsx:276` → `accept="image/png,image/jpeg,image/svg+xml,image/bmp"` - `app.py:181-184` docstring → "Accepts `multipart/form-data` with: `image` — binary PNG or JPG" If a user drops an SVG via the UI today, the backend either silently rasterizes or rejects with 422 `invalid_image`. The UI is overpromising. ## Suggested fix Decide: either (a) extend `/v1/digitize` to accept SVG (the engine already has SVG path logic), or (b) update the UI accept list to match the backend. Update the docstring either way. ## Severity LOW — confusing, not breaking.
Mark 2026-08-30 00:30:16 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Mark/easystitch-service#11
No description provided.