Atualizar app/app.py
This commit is contained in:
+2
-2
@@ -825,7 +825,7 @@ def import_file(cid):
|
||||
file.save(path)
|
||||
|
||||
ext = file.filename.lower().split(".")[-1]
|
||||
if ext not in ["doc", "docx", "odt", "txt", "md", "html", "htm"]:
|
||||
if ext not in ["doc", "docx", "odt", "txt", "md", "html", "htm", "rtf", "epub"]:
|
||||
return jsonify({"erro": "Formato não suportado."}), 400
|
||||
|
||||
if ext == "pdf":
|
||||
@@ -858,7 +858,7 @@ def import_file(cid):
|
||||
@app.route("/api/export/pandoc/<writer>/<cid>/<filename>")
|
||||
@login_required
|
||||
def export_pandoc(writer, cid, filename):
|
||||
if not writer in ["docx","xlsx","pptx","markdown","txt","odt","html"]:
|
||||
if not writer in ["docx","xlsx","pptx","markdown","txt","odt","rtf","epub","html"]:
|
||||
return jsonify({"erro": "Formato de exportação não suportado."}), 400
|
||||
email = session["db_user"]["email"] if app.config["AUTH_MODE"] == "db" else session["user"]["email"]
|
||||
db = SessionLocal()
|
||||
|
||||
Reference in New Issue
Block a user