fix: change error message

This commit is contained in:
RitvikSardana 2024-12-17 13:10:27 +05:30
parent 15f64fa7bc
commit f6637d7ef0

View file

@ -36,7 +36,6 @@ ALLOWED_MIMETYPES = (
"text/plain",
"video/quicktime",
"video/mp4",
"text/csv",
)
@ -181,7 +180,7 @@ def upload_file():
if content is not None and (frappe.session.user == "Guest" or (user and not user.has_desk_access())):
filetype = guess_type(filename)[0]
if filetype not in ALLOWED_MIMETYPES:
frappe.throw(_("You can only upload JPG, PNG, PDF, TXT or Microsoft documents."))
frappe.throw(_("You can only upload JPG, PNG, PDF, TXT, CSV or Microsoft documents."))
if method:
method = frappe.get_attr(method)