How can I limit the type of files of the email attachments sent by my contact form to Doc, Docx, PDF?
There's a snippet for that.
Usage is:
attachment = ExtFileField(ext_whitelist=(".pdf", ".txt"))