ConGustoAI / ConGustoAI/chat

Define SVG media upload behavior

Open
#186 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Svelte
Stars
9
Forks
1
Avg merge
58m
Merged PRs (30d)
1

Description

## Problem

Valid `image/svg+xml` files are currently classified as text because SVG has no binary signature and text-content detection runs before browser MIME fallback. Before the media classifier changes, browser MIME classified SVG as an image and the original SVG could be sent directly to providers. Provider vision APIs do not consistently document SVG support.

## Decide

Choose an explicit SVG contract instead of relying on generic MIME/text heuristics:

- reject SVG with a clear unsupported-format error;
- rasterize SVG to PNG before image processing/provider submission; or
- intentionally attach SVG source as text.

## Acceptance criteria

- behavior is explicit and provider-safe;
- UI reports the chosen representation;
- classifier/submission tests cover `image/svg+xml`;
- untrusted SVG is never injected into the DOM as raw markup.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing the media classifier, browser MIME fallback, provider submission path, and UI representation handling described in the issue. Choose and document one explicit SVG contract, then add classifier and submission coverage for image/svg+xml. Done means the UI reports the chosen representation and untrusted SVG is never injected as raw markup.

Written by the indexing model from the issue text.

Assessment

Domain
api, frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.