We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 54ba622 commit 418c204Copy full SHA for 418c204
app.py
@@ -35,8 +35,11 @@ def upload():
35
# unavailable because no secret key was set). This was solved in the
36
# __main__ block by setting a key.
37
if request.method == 'POST':
38
- # check if the post request has the file part
39
- if 'file' not in request.files:
+ # Check if request is coming from elasticsearch
+ if 'data' in request.form:
40
+ return render_mmif(request.form['data'])
41
+ # Otherwise, check if the post request has the file part
42
+ elif 'file' not in request.files:
43
flash('WARNING: post request has no file part')
44
return redirect(request.url)
45
file = request.files['file']
0 commit comments