Skip to content

Instantly share code, notes, and snippets.

@briezler
Created June 29, 2017 16:15
Show Gist options
  • Save briezler/725d66cc2af8823e5b065681cbddf2d1 to your computer and use it in GitHub Desktop.
Save briezler/725d66cc2af8823e5b065681cbddf2d1 to your computer and use it in GitHub Desktop.
File Informationen via typoscript
# 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