[TYPO3-mvc] Resolve file path from file:xx

Natalia Postnikova npostnik at yahoo.de
Wed Feb 13 10:30:26 CET 2013


Dear list-members,

I try to fix the error in the latest version of templavoila 1.8.0 in TYPO3 6.0.
The problem is, that the value saved in DB is not the file path any more, but an identifier like  "file:74". Therefore no mapping is possible.
This is the function used to retrieve the path to the file:
$fileReference = t3lib_div::getFileAbsFileName($toObj->getFileref());
Of course it does not work any more.

What I've got so far:
$resourceFactory = t3lib_div::makeInstance('TYPO3\CMS\Core\Resource\ResourceFactory');
$fileObject = $resourceFactory->retrieveFileOrFolderObject($toObj->getFileref());

How can I retrieve the file path from $fileObject?
It there a totally different approach get a file path from "file:74"?

Are there some working examples for FAL API usage?

Please help!
Kind regards
Natalia



More information about the TYPO3-project-typo3v4mvc mailing list