Not able to attach attachments from webform

I have created a web form that requires login to the form and there is a field for attachments to accept the attachment but when I tried to attach attachments it is throwing following error.

find here the console log.


@rmehta please help me with this.

Note: Desk access is not given to user and login is required for filling form.

What is the file type? @niraj_regmi

I want pdf, csv, xlsx, zip and images files also… please help me with this.

For the version 14, then check the limitation.

But in v15, provides the facility to add File Extensions

Enable the “Allow Guests to Upload Files” and check it.

I have tried all this in both v15 and 14 and enable allow gest to upload file still facing the issue. But if i give desk access to that particular role then there is no problem. But i dont wanna give desk access

I have tried this.


but still facing problem in v 15.

I think there is some bug there.

I checked that ‘allowed file extensions’ might be used in different cases, not have much idea, but the same validation is in v15. It works properly if you upload pdf, jpeg and png file.

if i add other file extension in allowed _mimetype it works but this is core function and now to want this allowed_mimetypes to override from custom so that in future if core is updated my customization remains intact. I couldn’t find any hooks to override core function. Do you have any idea regarding this?

1 Like

Same issue I am facing ?
is anyone knows how to fix it using customization.
if we added “text/csv”, in ALLOWED_MIMETYPES = () , with in handler.py file then its accepting .csv file, but I dont want to change in the core code of frappe.