75👍
✅
Make sure that your form has the enctype
set, e.g.:
<form method="post" enctype="multipart/form-data">
From the docs:
Note that request.FILES will only contain data if the request method was POST and the
<form>
that posted the request has the attribute enctype=”multipart/form-data”. Otherwise, request.FILES will be empty.
Source:stackexchange.com