Created
June 29, 2017 16:15
-
-
Save briezler/725d66cc2af8823e5b065681cbddf2d1 to your computer and use it in GitHub Desktop.
File Informationen via typoscript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# get file information with FILES Object | |
lib.dbTest = FILES | |
lib.dbTest { | |
files = 12345 | |
renderObj = TEXT | |
renderObj { | |
stdWrap.data = file:current:size | |
stdWrap.wrap = <p>File size: <strong>|</strong></p> | |
} | |
} | |
# short with getText | |
lib.dbTest = TEXT | |
lib.dbTest { | |
data = file:12345:size | |
wrap = Test: | | |
} | |
# Last file by uid in specific directory | |
# folders = 1: is the desired storage followede by the path /.../.../ | |
lib.dbTest = FILES | |
lib.dbTest { | |
folders = 1:/user_upload/path_to_dir/ | |
folders.recursive = 1 | |
sorting = uid desc | |
maxItems = 1 | |
renderObj = TEXT | |
renderObj { | |
stdWrap.data = file:current:size | |
stdWrap.wrap = <p>Filesize: | </p> | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment