Merge pull request #28804 from RitvikSardana/csv-support
fix: add support for CSV files for non desk users
This commit is contained in:
commit
b861a014ac
1 changed files with 2 additions and 1 deletions
|
|
@ -36,6 +36,7 @@ ALLOWED_MIMETYPES = (
|
|||
"text/plain",
|
||||
"video/quicktime",
|
||||
"video/mp4",
|
||||
"text/csv",
|
||||
)
|
||||
|
||||
|
||||
|
|
@ -180,7 +181,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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue