[TYPO3-dev] add uploadfolder TSConfig ovverride possibility

Oliver Hader oh at inpublica.de
Mon May 14 19:53:58 CEST 2007


Hi Stefano,

stefano cecere wrote:
> Martin Kutschker wrote:
>> stefano cecere schrieb:
>>> i just filled this bug/request: http://bugs.typo3.org/view.php?id=5623
>>>
>>> right now with TSConfig it is possible to override these config
>>> parameters of a group field:
>>>
>>> group - size, autoSizeMax, max_size, show_thumbs, maxitems, minitems
>>>
>>> it would be VERY USEFUL to add 'uploadfolder'.
>>
>> But extensions depend on the value in the TCA. If we allow the
>> uploadfolder to be overridden than eg plugins must load the page TS to
>> render images.
> 
> good point.
> right now mu extension uploads files (FE user uploaded files) to
> subdirectories calculated by a custom field in the category record...
> but if i edit those records via typo3, the files go to the wrong directory.

So, you'd like to have something like this schema, to prevent from
overloading a directory with too many files. Am i right?
./m/y/myfile_01.gif
./t/h/the_first_file.gif
./t/h/the_last_file.gif

The caching to file of TYPO3 is working like this. So the request would
be an alternative/improved/balanced storing method for files in the
filesystem.

There are hooks in TCEforms that might also allow to change the TCA
configuration (e.g. the uploadFolder) on the fly (I haven't used them
yet, but know that they exist). Maybe it's worth to have a look there.

But the better thing would be, if TYPO3 could decide about this in
future which strategy to take for some 50 files and which for some
10.000 files.

> it would be enough to add to the "uploadfolder" TCA some capabilities
> like "foreign_table_where" in SELECT type fields..
> even also a ###REC_FIELD_[fieldname]###   ... do you think it's
> complicated?
> 
> putting the calculation straight in the TCA (and not in the TSConfig)
> should prevent all those problems, not?

What exactly do you mean? Something like the following?
array(..., 'uploadFolder' => userFunc($something), ...);

TCA just defines the table and the how the fields there are used. But
TCA isn't called with the values of each different record.


olly
-- 
Oliver Hader
http://inpublica.de/




More information about the TYPO3-dev mailing list