I was pinged by my helpdesk user for not being able to upload many types of file into the helpdesk ticket. Then I figured out the restriction put in the frappe framework for website users.
Helpdesk operations will often need users to upload files for troubleshooting. And the file types can be vary a lot, like log files, pcap, traces, zip files, etc.
The frappe framework restricts the web users (helpdesk users belong to this category) to only upload a few mime types, namely JPG, PNG, PDF, TXT or Microsoft documents. (hardcoded in handler.py in frappe/frappe folder).
Can we have a better way to do this? Either have an option in frappe for disabling this restriction. Or have an option of setting the allowed mime types instead of hardcoding a few in the code?
Thanks @snv , we will consider to do that. But will it be good if we can have the option in the system to allow specifying what type of files are allowed for website users?
I am just trying not to do the modification every time I upgrade
Yes, I think this is a good candidate for a feature request on Github
And yes, overriding has maintenance burden. But it’s the best solution right now. Generally, whitelisted functions do not change across releases of the same stable version.