[TYPO3-dev] TCA->group and direct file references (used in tt_news, mailformplus)

Martin Borer mbarts at gmx.ch
Wed Mar 12 23:14:07 CET 2008


Hi list,

I've reported a feature request some month ago. It was about a better
usage of absolute file references using TCA->group->file, which is not
officially supported by the Typo3 core.

But some extension programmers did a workaround (including me) with
letting the "uploadfolder" empty in their TCA-config (used in tt_news,
mailformplus). Typo3 stores only the absolute path to the selected files
without copy them to an upload folder.

There are some problems using an empty upload folder:
- error with Thumbnails
- no record in file references table
- upload field is unnecessary
- filename isn't identifiable anymore (because the whole long path is
displayed in the selector box)

This Problems are solved in a patch I've applied to the bugtracker:
http://bugs.typo3.org/view.php?id=6039

After a hint from Ingmar, I've made a new patch with an additional 
internal_type 'file_reference' for TCA->group (attached here).

There are now 2 ways to have direct file references.
1. New internal_type for TCA->group called 'file_reference' it's almost 
an alias for 'file' with the difference that the option 'uploadfolder' 
is always ignored, so it's always a file reference.

2. internal_type 'file' with empty 'uploadfolder' Option. With this 
config the behavior is exactly the same like the internal_type 
'file_reference'.

So what do you think about it? Should this be solved like I did, or do 
you have some other ideas?

Greets
Martin
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 6039_v4_new_internal_type.patch
URL: <http://lists.typo3.org/pipermail/typo3-dev/attachments/20080312/7a32f550/attachment.txt>


More information about the TYPO3-dev mailing list