[Fixed]-Django Contact Form Attachment showing 'This field is required.' What am I doing Wrong?

1👍

✅

You need to pass FILES into the form as well, since it has a file field:

    form = ContactForm(request.POST, request.FILES)

This is all explained in the documentation for uploading files.

Leave a comment