update forms.FileField on django forms
问题 I have a model with a FileField in it: class DocumentUpload(models.Model): document_name = models.CharField(max_length=100, blank=True) document_path = models.FileField(upload_to='uploads') and a form which uses this model class DocumentUploadForm(forms.ModelForm): class Meta: model = DocumentUpload When I use the form to create a new upload everything works fine. if request.method == 'POST': form = DocumentUploadForm(request.POST, request.FILES) if form.is_valid(): form.save() However when I