Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#201 closed defect (invalid)

ImageField validation error

Reported by: Steadicat Owned by: Adrian Holovaty
Component: contrib.admin Version:
Severity: major Keywords:
Cc: django@… Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Once an image has been uploaded in an ImageField (its path is shown labeled "currently"), any successive edit to the object raises a validation error: "Enter a valid filename.".

This happens regardless of whether a new image is being uploaded or not.

(OS: Windows, Browser: any)

Change History (3)

comment:1 Changed 13 years ago by Steadicat

Cc: django@… added

comment:2 Changed 13 years ago by anonymous

milestone: Version 1.0
Severity: normalmajor

comment:3 Changed 13 years ago by GomoX <gomo AT datafull DOT com>

milestone: Version 1.0
Resolution: invalid
Status: newclosed

Ok, I found what causes this.
When you do not have your MEDIA_ROOT set, you have this odd behaviour. The problem is, when you don't have it set, it doesn't complain either. There are a few things that should be done about this.
1) Add a link to the corresponding FAQ (which exists) in the ImageField description on /documentation/model_api, or even to the Common Pitfall page on this.
2) The code should complain when it cannot write, instead of trapping the exception, just let it pop. This looks like it's related to
(I can't find the ticket that linked me there).

I'm posting some new tickets to reflect this.

Note: See TracTickets for help on using tickets.
Back to Top