Project

General

Profile

Actions

Feature #86802

closed

Add possibility to automatically place uploaded files in a pattern specified subfolder of the user_upload foder

Added by Paul Kamma about 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Could have
Assignee:
-
Category:
-
Target version:
-
Start date:
2018-10-30
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

I often encountered the problem, or noticed the behaviour, that clients (which are usually non-technical persons) "overuse" the comfort feature of uploading images directly in a Content-Element (like the Image CE).
The Image gets placed in the user_upload folder and when time flies by the folder starts to grow and then we have over 1k files in it.

This leads to the problem that when someone peeks into the folder to select a file he uploaded some days before, it takes a huge amount of time to load and is also unusable.
Sure, it would be better the User would upload the file first in a curated folder and then select it.
But even after telling the clients to do it .. they often say "I have no time, can the typo3 do it for me instead?".

It's a CMS, so let the System Manage the Content for me.

So my idea was that It would be nice to tell typo3 that he doesn't have to put the files directly into the user_upload folder, instead create folders with a specific pattern/format.

e.g.
The pattern would be default "YYY-MM-DD" and when the user uploads a file, typo3 place it into "user_upload/2018-10-30".
Or maybe it can be configured that it takes the users name and slugify it. e.g "user_upload/kasper-skarhoj/".
The possibilities could be endless.

How do you think about it?

Actions #1

Updated by Georg Ringer about 6 years ago

  • Status changed from New to Closed

Thanks for creating this patch. In general this looks like a nice idea but I am sure that there are quite some issues to be solved like:

  • wouldn't it make sense to take different sites into account
  • maybe different record types like news or blog or press and how to identify such stuff
  • what about different users?

I am closing this issue because the core shouldn't deliver another incomplete solution. However there is already a hook on exactly the location you need it and it is called $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauthgroup.php']['getDefaultUploadFolder']. I propose to create an extension which can take the lead to create the best solution needed by the community. If this is once solved I am pretty sure it won't be hard to take those learnings into the core back.

Feel free to start this extension, start a slack channel, twitter discussion to get some noise and start coding. I am confident that a lot of clients would be happy to get a better solution.

Actions

Also available in: Atom PDF