[TYPO3-english] Re: Manually insert image in sys_file table is not working properly in backend of typo3 7 version

Jainish Senjaliya jainishsenjaliya at gmail.com
Fri Apr 22 13:31:10 CEST 2016

Hey Jigal,

Thanks for reply,

but this code is not working for me anymore.

use TYPO3\CMS\Core\Utility\PathUtility;
use TYPO3\CMS\Core\Resource\ResourceFactory;

$targetFile = "fileadmin/user_upload/js_contact_form/jainish.jpg";

$identifier = PathUtility::getRelativePath(PATH_site,PathUtility::dirname($targetFile)) ;

not getting any response in $identifier.

is there any reason ??

More information about the TYPO3-english mailing list