[Neos] Resolve Path of a file
Carsten Bleicker
carsten at bleicker.de
Wed May 21 22:28:16 CEST 2014
Hi Helmut,
but this resolves in cli command only _Resrouces/......
Need to read this file for pdf generation.
----------------------
Carsten Bleicker
Wülfingstraße 1
42477 Radevormwald
E-Mail: carsten at bleicker.de
Web: www.bleicker.de
Twitter: @carstenbleicker
Jabber: cbleicker at jabber.ccc.de
Telefon: +49 (0)171-2690845
Am 21.05.2014 um 22:22 schrieb Helmut Hummel <helmut.hummel at typo3.org>:
> Hi Carsten,
>
> On 21.05.14 22:02, Carsten Bleicker wrote:
>
>> Need to get the system path of a file located in public resources folder.
>> But i can only find methods in resourcepublisher wich delivers me http// uri.
>> need /foo/bar/baz.jpg
>>
>> Any hints?
>
> You should never directly access resources by a file path, but always by suing a resource uri:
>
> resource:://Package.Key/Public/file.txt
>
> Thanks to a stream wrapper you can pass this as path to php file functions, e.g.:
>
> file_get_contents('resource://TYPO3.Flow/Public/Error/Debugger.css')
>
> HTH
>
> Kind regards,
> Helmut
>
> --
> Helmut Hummel
> Release Manager TYPO3 6.0
> TYPO3 Core Developer, TYPO3 Security Team Member
>
> TYPO3 .... inspiring people to share!
> Get involved: typo3.org
> _______________________________________________
> Neos mailing list
> Neos at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/neos
More information about the Neos
mailing list