Support BLOB values in row edit UI

This commit is contained in:
Simon Willison 2026-07-03 16:09:27 -07:00
commit 19dde1c860
7 changed files with 754 additions and 26 deletions

View file

@ -17,7 +17,7 @@ Datasette includes special handling for these binary values. The Datasette inter
Binary values in JSON
---------------------
Binary data is represented in ``.json`` exports using Base64 encoding.
Binary data is represented in ``.json`` exports using Base64 encoding. Datasette uses this representation for every ``BLOB`` value, including binary values that could also be decoded as UTF-8 text.
https://latest.datasette.io/fixtures/binary_data.json?_shape=array

View file

@ -9,6 +9,8 @@ Changelog
1.0a36 (in development)
-----------------------
- Datasette's JSON APIs now consistently encode every ``BLOB`` value using the documented :ref:`binary value JSON format <binary_json_format>`, even when the bytes could be decoded as UTF-8 text.
- The insert and edit row dialogs now provide a dedicated control for ``BLOB`` values. Existing binary values are shown by byte size, image values under 10MB are previewed as thumbnails, and replacements can be attached, dropped or pasted into the control.
- The table and row JSON APIs now support ``?_extra=column_details`` for returning SQLite schema details for columns, including declared type, SQLite affinity, primary key, ``NOT NULL``, default and hidden-column metadata.
.. _v1_0_a35: