Django: Save an uploaded file to a FileField Django: Save an uploaded file to a FileField django django

Django: Save an uploaded file to a FileField


Well, my suspicions were confirmed: I am an idiot :)

The method I outline in my question is, in fact, correct — it wasn't working because I'd forgotten to include enctype="multipart/form-data" on the form.

Anyway, I'll leave this question here, just incase other people have the same problem.


I also had issues with file not really posted to server when name attribute was not specified in input tag

<input type="file" name="somename">