added file type checks to the parsers to prevent temporary files from being consumed. Also: parsers announce file types they wish to use as default for each mime type.

This commit is contained in:
jonaswinkler
2020-11-30 00:40:04 +01:00
parent 64ee8eab2f
commit f51207fc32
7 changed files with 83 additions and 21 deletions

View File

@@ -5,8 +5,8 @@ def text_consumer_declaration(sender, **kwargs):
return {
"parser": TextDocumentParser,
"weight": 10,
"mime_types": [
"text/plain",
"text/comma-separated-values"
]
"mime_types": {
"text/plain": ".txt",
"text/csv": ".csv",
}
}