/db/table/-/blob/pk/column.blob download URL, refs #1036

This commit is contained in:
Simon Willison 2020-10-24 16:09:18 -07:00 committed by GitHub
commit 5a15197960
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 183 additions and 66 deletions

View file

@ -51,6 +51,9 @@ class DatasetteError(Exception):
class BaseView:
ds = None
def __init__(self, datasette):
self.ds = datasette
async def head(self, *args, **kwargs):
response = await self.get(*args, **kwargs)
response.body = b""
@ -151,9 +154,6 @@ class DataView(BaseView):
name = ""
re_named_parameter = re.compile(":([a-zA-Z0-9_]+)")
def __init__(self, datasette):
self.ds = datasette
def options(self, request, *args, **kwargs):
r = Response.text("ok")
if self.ds.cors: