webcodelab commited on
Commit
a2b0e72
·
verified ·
1 Parent(s): 96a564e

Update app/routes.py

Browse files
Files changed (1) hide show
  1. app/routes.py +5 -0
app/routes.py CHANGED
@@ -322,6 +322,11 @@ def docs():
322
  return render_template('docs.html', response=None)
323
 
324
 
 
 
 
 
 
325
  @auth.route('/try-api', methods=['POST'])
326
  def try_api():
327
  api_key = request.form.get('api_key')
 
322
  return render_template('docs.html', response=None)
323
 
324
 
325
+ allowed_extensions = {'pdf', 'docx'}
326
+ def allowed_file(filename):
327
+ return '.' in filename and filename.rsplit('.', 1)[1].lower() in allowed_extensions
328
+
329
+
330
  @auth.route('/try-api', methods=['POST'])
331
  def try_api():
332
  api_key = request.form.get('api_key')