issues: 860625833
This data as json
id | node_id | number | title | user | state | locked | assignee | milestone | comments | created_at | updated_at | closed_at | author_association | pull_request | body | repo | type | active_lock_reason | performed_via_github_app | reactions | draft | state_reason |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
860625833 | MDU6SXNzdWU4NjA2MjU4MzM= | 1300 | Make row available to `render_cell` plugin hook | 3243482 | closed | 0 | 5 | 2021-04-18T10:14:37Z | 2022-07-07T16:34:05Z | 2022-07-07T16:31:22Z | CONTRIBUTOR | Original title: Generating URL for a row inside Hey, I am using Datasette to view a database that contains video metadata. It has BLOB columns that contain video thumbnails in JPG format (around 100-500KB per row). I've registered an output formatter that extends ```python from datasette.blob_renderer import render_blob async def render_jpg(datasette, database, rows, columns, request, table, view_name): response = await render_blob(datasette, database, rows, columns, request, table, view_name) response.content_type = "image/jpeg" response.headers["Content-Disposition"] = f'inline; filename="image.jpg"' return response @hookimpl def register_output_renderer(): return { "extension": "jpg", "render": render_jpg, "can_render": lambda: True, } ``` This works well. I can visit I want to display the image directly with an Datasette generates a link with But I have no way of getting the row inside the
Any pointers? |
107914493 | issue | { "url": "https://api.github.com/repos/simonw/datasette/issues/1300/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed |