[TYPO3-dam] Media types and file types

georg kuehnberger georg at georg.org
Tue May 27 21:34:41 CEST 2008


Uschi,

Uschi Renziehausen wrote:
> Hi Francois,
> thanks for pointing me into the right direction, started to explore 
> EXT:dam/lib/tx_dam_types.php. So far I found out why my psd files show 
> up under 'Undefined'. They are simply not mentioned in that file. Is 
> that a bug?

Well IMHO it's a BUG in the sense that THIS type of files (Photoshop 
duuuh ....) should definitely be not included in
    tx_dam_types.php

(even if the majority of coders probably prefer ASCII-art [optionally 
animated ...] with media type: TEXT ;-)

Options would be:
   'psd'	=> 'image/photoshop',
   'psd'	=> 'image/x-photoshop',

& yes pls. add it in the bugtracker;
(wiser chapse/sses than me might decide on +/- x)

>>> The only way to add or edit media types is the list module.
>>> If you want to change the parent media type of a file type (e.g. move 
>>> .psd from Undefined to Image) you can do it there.
>>
>> I don't think this can be modified at all...
>>
> Well you *can* do it, I tried it out. I am just very unsure whether you 
> *should* do it. As I had the idea, others might have it as well, and in 
> case this has some bad side effects that should be mentioned in the 
> docs. Can you or someone else be so kind and give me a little more inside?
> Ciao, Uschi

 From a documentation point of view NO, this should IMHO not be 
recommended. reasoning: The TYPO3-Developer should better use Georg's / 
Francois's advice on changing it via the TCA, that is via an Extensions;
reasoning: File-Extensions / MIME and Media-Types dont change that often 
and are "somewhat" standardized. So it should IMHO rather NOT be the 
task of an editor (or any person accidently owning BE-admin-rights) to 
change those.

see also:
class.tx_dam.php
---
	/**
	 * Register a file type
	 * This extends or overwrite the internal list of mime types which is 
used to detect a media type and a file type.
	function register_fileType ($fileExtension, $mimeType, $mediaType='') {


BTW-1: I thought, I've even also seen an example in EXT:dam_demo however 
cant find it by now; (never been there there?)

BTW-2: This "T3_VAR" "feels" extremely outdated; together with Francois 
I'd vote for putting it into $TYPO3_CONF_VARS;

hth regards georg
PS at Uschi: Thanks for your excellent efforts on documentation so far.




More information about the TYPO3-project-dam mailing list