PDF File change detection - Initial PDF fetcher support with basic text extraction (#1244)

This commit is contained in:
dgtlmoon
2022-12-19 17:51:41 +01:00
committed by GitHub
parent e8e176f3bd
commit 13c4121f52
10 changed files with 143 additions and 15 deletions

View File

@@ -168,5 +168,15 @@ def live_server_setup(live_server):
def test_return_query():
return request.query_string
@live_server.app.route('/endpoint-test.pdf')
def test_pdf_endpoint():
# Tried using a global var here but didn't seem to work, so reading from a file instead.
with open("test-datastore/endpoint-test.pdf", "rb") as f:
resp = make_response(f.read(), 200)
resp.headers['Content-Type'] = 'application/pdf'
return resp
live_server.start()