[Neos] Resolve Path of a file

Carsten Bleicker carsten at bleicker.de
Wed May 21 22:38:02 CEST 2014


Seems there is a constant set from the bootstrap:
FLOW_PATH_WEB
Using this works for me. (Currently, but i hove forever ;))

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