[Fixed]-FileUpload not working in Django

1👍

You need to change your form tag:

<form method="POST" action="" enctype="multipart/form-data">

From the documentation:

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.

Leave a comment