{"html_url": "https://github.com/simonw/datasette/issues/1050#issuecomment-719021514", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1050", "id": 719021514, "node_id": "MDEyOklzc3VlQ29tbWVudDcxOTAyMTUxNA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-29T21:05:08Z", "updated_at": "2020-10-29T21:05:08Z", "author_association": "OWNER", "body": "Idea: what if Datasette had a custom SQLite function that could be used to generate URLs to the row-level BLOB download for a value? Then custom SQL query authors could use that function to link to the relevant content.\r\n\r\nThis could be expanded to exposing other `datasette.urls` functionality as well.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 729057388, "label": "Switch to .blob render extension for BLOB downloads"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1050#issuecomment-719001701", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1050", "id": 719001701, "node_id": "MDEyOklzc3VlQ29tbWVudDcxOTAwMTcwMQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-29T20:26:44Z", "updated_at": "2020-10-29T20:26:44Z", "author_association": "OWNER", "body": "I'll do the rest of the work on this in the pull request #1061.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 729057388, "label": "Switch to .blob render extension for BLOB downloads"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1050#issuecomment-718989895", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1050", "id": 718989895, "node_id": "MDEyOklzc3VlQ29tbWVudDcxODk4OTg5NQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-29T20:04:15Z", "updated_at": "2020-10-29T20:04:15Z", "author_association": "OWNER", "body": "I'll use `hashlib.sha256` for these hashes.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 729057388, "label": "Switch to .blob render extension for BLOB downloads"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1050#issuecomment-718987852", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1050", "id": 718987852, "node_id": "MDEyOklzc3VlQ29tbWVudDcxODk4Nzg1Mg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-29T20:00:32Z", "updated_at": "2020-10-29T20:00:32Z", "author_association": "OWNER", "body": "The reason I like the `?_blob_hash=` solution is that it feels really misleading to provide a link to \"download this binary\" which could conceivably download some other data.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 729057388, "label": "Switch to .blob render extension for BLOB downloads"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1050#issuecomment-718980944", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1050", "id": 718980944, "node_id": "MDEyOklzc3VlQ29tbWVudDcxODk4MDk0NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-29T19:46:19Z", "updated_at": "2020-10-29T19:46:19Z", "author_association": "OWNER", "body": "Had an idea in https://github.com/simonw/datasette/issues/1051#issuecomment-718980659\r\n\r\n> OK, alternative idea. The `.blob` output renderer from #1050 gets to see multiple rows at once.\r\n> \r\n> For an arbitrary SQL query, how about if I link to this?\r\n> \r\n> `/db.blob?sql=...&_blob_column=data&_blob_hash=bc4c24181ed3ce666`\r\n> \r\n> Then the output renderer loops through all of the `data` results that are available to it and, if one of them hashes to that value, serves up that data?\r\n> \r\n> If no matches are found it can show an error message telling you that the link has expired (presumably because the underlying database has changed since the link was generated).\r\n> \r\n> I think this might be the best solution to the problem.\r\n\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 729057388, "label": "Switch to .blob render extension for BLOB downloads"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1050#issuecomment-718346019", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1050", "id": 718346019, "node_id": "MDEyOklzc3VlQ29tbWVudDcxODM0NjAxOQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-29T04:05:07Z", "updated_at": "2020-10-29T04:05:07Z", "author_association": "OWNER", "body": "Yes, confirmed - this is a bug where if the `BLOB` column contains a `null` you get a nasty exception if you try to download it.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 729057388, "label": "Switch to .blob render extension for BLOB downloads"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1050#issuecomment-718342036", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1050", "id": 718342036, "node_id": "MDEyOklzc3VlQ29tbWVudDcxODM0MjAzNg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-29T03:49:57Z", "updated_at": "2020-10-29T03:49:57Z", "author_association": "OWNER", "body": "@thadk from that error it looks like the problem may have been that you had a BLOB column containing a `null` value? If so that's definitely a bug, I'll fix that.", "reactions": "{\"total_count\": 1, \"+1\": 1, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 729057388, "label": "Switch to .blob render extension for BLOB downloads"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1050#issuecomment-718317997", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1050", "id": 718317997, "node_id": "MDEyOklzc3VlQ29tbWVudDcxODMxNzk5Nw==", "user": {"value": 283343, "label": "thadk"}, "created_at": "2020-10-29T02:24:50Z", "updated_at": "2020-10-29T02:29:24Z", "author_association": "NONE", "body": "Unsolicited feedback for an unreleased feature of the [current](https://github.com/simonw/datasette/commit/5e0b72247ecab4ce0fcec599b77a83d73a480872) unreleased GitHub version (I casually wanted to access a blob row) \u2013 the existing #1036 route doesn't support special characters in database or table names (e.g. `@()` ). Maybe this is motivation for your new idea here.\r\n\r\nAlso I got this error/crash with my blob and wasn't able to get the file: https://gist.github.com/thadk/28ac32af0e88747ce9056c90b0b19d34", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 729057388, "label": "Switch to .blob render extension for BLOB downloads"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1050#issuecomment-716174203", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1050", "id": 716174203, "node_id": "MDEyOklzc3VlQ29tbWVudDcxNjE3NDIwMw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-25T16:27:39Z", "updated_at": "2020-10-25T16:53:27Z", "author_association": "OWNER", "body": "Idea: `.blob` output rendererer, where you tell it which column you want using `?_blob_column=x`.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 729057388, "label": "Switch to .blob render extension for BLOB downloads"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1050#issuecomment-716175236", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1050", "id": 716175236, "node_id": "MDEyOklzc3VlQ29tbWVudDcxNjE3NTIzNg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-25T16:35:20Z", "updated_at": "2020-10-25T16:35:20Z", "author_association": "OWNER", "body": "This is clearly a better solution than the one I implemented in #1040 - I don't have to add a new route, I don't have to implement permission checks, it reuses mechanism.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 729057388, "label": "Switch to .blob render extension for BLOB downloads"}, "performed_via_github_app": null}