From 9e3e2a792ead384ea5c90eb07ef5bed0c0d6c114 Mon Sep 17 00:00:00 2001 From: Stigi Date: Wed, 18 Feb 2026 09:05:51 +0100 Subject: [PATCH 1/3] Create PathInfo.js --- Resources/Public/JavaScript/PathInfo.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Resources/Public/JavaScript/PathInfo.js diff --git a/Resources/Public/JavaScript/PathInfo.js b/Resources/Public/JavaScript/PathInfo.js new file mode 100644 index 0000000..ce98f45 --- /dev/null +++ b/Resources/Public/JavaScript/PathInfo.js @@ -0,0 +1,22 @@ +document.addEventListener('DOMContentLoaded', function () { + if (!window.uploadFolderInfo) return; + Object.keys(window.uploadFolderInfo).forEach(function(field) { + var path = window.uploadFolderInfo[field]; + var container = document.querySelector('.form-group[data-local-field="' + field + '"]'); + if (!container) return; + + if (!container.querySelector('.upload-folder-info')) { + var infoDiv = document.createElement('div'); + infoDiv.className = 'upload-folder-info help-block'; + infoDiv.style.marginBottom = '0'; + infoDiv.innerHTML = '
Standard Upload Ordner:
' + path + '
'; + + var fileControls = container.querySelector('.form-control-wrap'); + if (fileControls) { + fileControls.appendChild(infoDiv); + } else { + container.appendChild(infoDiv); + } + } + }); +}); From 34b9a2a8f556745e0c06d08fa29456bb754df73e Mon Sep 17 00:00:00 2001 From: Stigi Date: Wed, 18 Feb 2026 09:36:01 +0100 Subject: [PATCH 2/3] Enhance README with path preview and FAQ updates Added path preview feature and updated FAQ section. --- README.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4126f20..5dca39d 100644 --- a/README.md +++ b/README.md @@ -28,9 +28,22 @@ Make it possible to configure the default upload folder for a certain TCA column # You can set a default year/month/day folder within the set default folder tx_news_domain_model_news.dateformat = 1 tx_news_domain_model_news = 1:news/{Y}/{m} + + # You can use page variables like {title}, {subtitle} or {nav_title} to create dynamic folders + tt_content.assets.variableformat = 1 + tt_content.assets = 1:user_upload/{title}/ } ``` +**** + +**Path Preview** + +The extension now displays the destination path directly in the backend for each upload field, providing immediate feedback on where files will be stored. + +![backend_01](https://github.com/user-attachments/assets/e4351cda-02a7-4544-ae9f-13b960602c74) + + **FAQ** _What happens when the editor does not have access to the upload folder?_ @@ -84,4 +97,4 @@ _Why does the year/month/week/day feature not use the php strftime function & fo > Specifically: https://docs.typo3.org/m/typo3/reference-coreapi/12.4/en-us/ApiOverview/Events/Events/Core/Resource/AfterDefaultUploadFolderWasResolvedEvent.html > > Added Services.yaml (as required for Event handling) -> Now receives $backendUserAuthentication directly from $GLOBALS['BE_USER']. \ No newline at end of file +> Now receives $backendUserAuthentication directly from $GLOBALS['BE_USER']. From 5c3385b19800cb14a8ef1ddc8b98ca615b8fec7d Mon Sep 17 00:00:00 2001 From: Stigi Date: Wed, 18 Feb 2026 09:55:33 +0100 Subject: [PATCH 3/3] Add JavaScriptModules.php configuration file --- Configuration/JavaScriptModules.php | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 Configuration/JavaScriptModules.php diff --git a/Configuration/JavaScriptModules.php b/Configuration/JavaScriptModules.php new file mode 100644 index 0000000..2b18ac2 --- /dev/null +++ b/Configuration/JavaScriptModules.php @@ -0,0 +1,8 @@ + [], + 'imports' => [ + '@beechit/default-upload-folder/' => 'EXT:default_upload_folder/Resources/Public/JavaScript/', + ], +];