Ticket #7556 (closed Bug: fixed)

Opened 9 years ago

Last modified 2 years ago

allowable_content_types ignored for at least ImageField

Reported by: deichi Owned by: davethewebb
Priority: minor Milestone: 4.x
Component: Archetypes Version: 4.1
Keywords: unsupported Cc:


(Moved from  http://dev.plone.org/archetypes/ticket/684)

setting allowable_content_types on an ImageField seems not to have any effect

Change History

comment:1 Changed 9 years ago by davethewebb

  • Reporter changed from davethewebb to deichi

11/07/07 02:43:56 changed by deo ¶

  • owner set to deo.
  • status changed from new to assigned.

I'll work on this one...

comment:2 Changed 9 years ago by hannosch

  • Milestone set to 3.0.x

comment:3 Changed 8 years ago by hannosch

  • Owner changed from deo to davethewebb

comment:4 Changed 4 years ago by ida

  • Keywords unsupported added
  • Status changed from new to closed
  • Version set to 4.1
  • Resolution set to invalid

Closing this ticket as Plone-3 is not supported anymore. Besides: allowed_content_types only makes sense with folders, no?

comment:5 Changed 4 years ago by alecm

  • Status changed from closed to reopened
  • Priority changed from major to minor
  • Resolution invalid deleted
  • Milestone changed from 3.3.x to 4.x

This appears to be a legitimate bug. ImageFields, both traditional and blob versions, have an allowable_content_types property (set to ('image/gif','image/jpeg','image/png') by default). However, this field is not actually used to validate uploaded images. This allows users to upload images which may not be displayable in web browsers (TIFF, PSD, BMP, etc.).

comment:7 Changed 2 years ago by davisagli

This appears to have broken TextFields in some cases when allowable_content_types is set and the user can choose a mimetype while editing. The new validation function just guesses the mimetype and it's not necessarily the one that was selected.

Note: See TracTickets for help on using tickets.