Opened 19 years ago

Closed 19 years ago

Last modified 18 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

Description

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 by Steadicat, 19 years ago

Cc: django@… added

comment:2 by anonymous, 19 years ago

milestone: Version 1.0
Severity: normalmajor

comment:3 by GomoX <gomo AT datafull DOT com>, 19 years ago

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 http://groups.google.com/group/django-users/browse_thread/thread/4bbbdf462b8f8f7c/2d898f2259d18fc6#2d898f2259d18fc6
(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