Ticket #2208 (closed enhancement: fixed)

Opened 9 years ago

Last modified 9 years ago

Automatic content creation helpers.

Reported by: gracinet Owned by: gracinet
Priority: P1 Milestone: CPS 3.5.2
Component: CPSDocument Version: unspecified
Severity: normal Keywords:


We need a standardized way to convert raw file information to a CPS documents for creation.

This is needed for #2205, but !CPSRemoteController should also use it and probably any tool for automatic content creation. There have been previous attempts at this, in the context of dedicated browser extensions: !CPSBrowserPlugins handled the mimetype -> document type conversion, but also fine mappings to extract several fields from the incoming file.

We'll privilege a simpler approach here. In all use-cases we've encountered, the result can depend on the container's type at most. Therefore, the configuration should be kept as a property (auto_content_types) of FlexibleTypeInformation, along with allowed_content_types.

This will be a lines property, each line holding 3 colon separated columns. The first for a mimetype regexp, the second for the portal type to create, the third for the file-like field to handle content in the created document. Example:

  audio/.*:Audio Track:audio_file

First line matching wins, any further extraction is handled at the level of the created document, through computeDependantFields or process_write_expr.

Change History

comment:1 Changed 9 years ago by gracinet

  • Status changed from new to closed
  • Resolution set to fixed

Works well in itself, but #2333 can sometimes get in the way

Note: See TracTickets for help on using tickets.