chrismattmann / tika-python

Tika-Python is a Python binding to the Apache Tika™ REST services allowing Tika to be called natively in the Python community.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

flask file post handling

JGuibone opened this issue · comments

Hello,

Im wondering if someone could help me find a work around to my current use case.

basically im using flask and taking user uploaded document from post

using this code.

flask-tika-01

the function tikaBasedParser() is this
flask-tika-02

and the flask error page is this.
flask-tika-03
flask-tika-04

i think the reason why its bugging out is because it tika.parser doesnt like getting object as an argument.
is there another way to pass file from the code?

You're correct, @JGuibone Currently Tika doesn't take an object in parser.from_file it takes the string filename. That said I just committed #316 which I believe will address this (give it a try). Closing but feel free to reopen if it doesn't handle that.