Opened 10 years ago

Closed 10 years ago

Last modified 9 years ago

#201 closed defect (invalid)

ImageField validation error

Reported by: Steadicat Owned by: adrian
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: UI/UX:

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 Changed 10 years ago by Steadicat

  • Cc django@… added

comment:2 Changed 10 years ago by anonymous

  • milestone set to Version 1.0
  • Severity changed from normal to major

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

  • milestone Version 1.0 deleted
  • Resolution set to invalid
  • Status changed from new to closed

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