typebot.io/packages/embeds
Baptiste Arnaud e7be877bc1
🐛 Fix Android camera for image extension uploads (#2558)
## What changed

- Detect image extensions in file upload allowlists using the shared
`extensionFromMimeType` table.
- Add the corresponding image MIME hints while preserving the original
extensions and the existing `capture=camera` Android workaround.
- Normalize casing and leading dots, deduplicate equivalent entries, and
prefer valid dotted extensions regardless of input order.
- Add focused unit coverage for image-only, mixed, non-image, duplicate,
and casing scenarios.
- Bump the JavaScript and React embed packages to `0.10.6` and ignore
local Revue comments.

## Why

The Android camera workaround was only enabled when the configured
allowlist already contained an `image/*` MIME type. Bots configured with
image extensions such as `.jpg`, `.jpeg`, and `.png` therefore never
received the workaround.

## Impact

Android users can access the existing camera option when a file upload
block is configured with image extensions. Browser hints are enriched
only on the client; server-side validation remains based on the block's
original options.

The `capture=camera` token remains a non-standard Android-specific
workaround and may continue to vary across browsers.

## Validation

- `bunx nx test @typebot.io/js` — 7 tests passed
- `bunx nx typecheck @typebot.io/js`
- `bunx nx format-and-lint`
- `git diff --check`

The repository-wide pre-commit affected test suite could not complete
locally because unrelated packages required missing environment
variables and existing SSRF tests failed. The targeted package tests,
typecheck, and repository formatting checks passed.
2026-07-13 11:35:47 +02:00
..
js 🐛 Fix Android camera for image extension uploads (#2558) 2026-07-13 11:35:47 +02:00
react 🐛 Fix Android camera for image extension uploads (#2558) 2026-07-13 11:35:47 +02:00
stories 🔧 Remove "baseUrl": "." from tsconfigs 2026-03-25 16:40:12 +01:00
wordpress 🐛 Update WordPress embed default lib version from 0.3 to 0.x (#2438) 2026-04-08 10:24:39 +02:00