Atualizar app/app.py

This commit is contained in:
2026-08-19 23:37:38 -03:00
parent 8d068089ca
commit 0df1917426
+2 -2
View File
@@ -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()