0

How can I limit the type of files of the email attachments sent by my contact form to Doc, Docx, PDF?

Dominic Rodger
  • 97,747
  • 36
  • 197
  • 212
Harry
  • 13,091
  • 29
  • 107
  • 167

1 Answers1

2

There's a snippet for that.

Usage is:

attachment = ExtFileField(ext_whitelist=(".pdf", ".txt"))
Dominic Rodger
  • 97,747
  • 36
  • 197
  • 212