datasette / datasette-extract

Import unstructured data (text and images) into structured tables
Apache License 2.0
143 stars 3 forks source link

Error: Invalid base64 image_url. #14

Closed simonw closed 6 months ago

simonw commented 6 months ago

Seeing this with 0.1a0 using the create-table feature:

Error code: 400 - {'error': {'message': 'Invalid base64 image_url.', 'type': 'invalid_request_error', 'param': None, 'code': None}}

I had not submitted an image.

simonw commented 6 months ago

Uploading an image DID work.

simonw commented 6 months ago

Relevant code: https://github.com/datasette/datasette-extract/blob/b6351e2c437b49cf3874dc960a98c62e19946537/datasette_extract/__init__.py#L70-L106

simonw commented 6 months ago

Here's why - image is:

image UploadFile(filename='', size=0, headers=Headers({'content-disposition': 'form-data; name="image"; filename=""', 'content-type': 'application/octet-stream'})) UploadFile(filename='', size=0, headers=Headers({'content-disposition': 'form-data; name="image"; filename=""', 'content-type': 'application/octet-stream'}))