Improve log upload handling
This commit is contained in:
@@ -116,7 +116,10 @@ def convert():
|
||||
flash(str(exc), "danger")
|
||||
return render_template("index.html", form=form), 400
|
||||
except UnicodeDecodeError:
|
||||
flash("The uploaded file is not valid UTF-8 text.", "danger")
|
||||
flash(
|
||||
"The uploaded file could not be decoded. Supported encodings are UTF-8, UTF-8 with BOM, Windows-1252, and Latin-1.",
|
||||
"danger",
|
||||
)
|
||||
return render_template("index.html", form=form), 400
|
||||
|
||||
preview_limit = current_app.config["PREVIEW_RECORD_LIMIT"]
|
||||
|
||||
Reference in New Issue
Block a user