[TYPO3-english] FAL error while retrieving "user_upload" folder

Gianluca Piccolo gianluca.piccolo at pallino.it
Thu Nov 20 11:12:01 CET 2014


Hi all,

In a command controller, I’m trying to get a folder by the storage object method “getFolder”, but it doesn’t work. I get this error: You are not allowed to access the given folder.
This is the code that generates that error:

$storageUid = 1; // this ID should be the “fileadmin/“ storage, autocreated by default
$someFolderIdentifier = 'user_upload';

$storageRepository = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Resource\\StorageRepository');

$storage = $storageRepository->findByUid($storageUid);
$folder = $storage->getFolder($someFolderIdentifier);

What am I doing wrong?

P.s. I’m using TYPO3 6.2

Thanks
Gianluca
_________________________________________________________

Gianluca Piccolo - Web developer
gianluca.piccolo at pallino.it <mailto:gianluca.piccolo at immaginario.com>
_________________________________________________________

Pallino&Co. - Comunicazione integrata
Immaginario - Divisione multimediale
Playbox - Web marketing

Via Decorati al Valor Civile 57/A, 35142 Padova, Italy
Tel. +39.049.8800329 - Int. 239
Fax +39.049.8800354
www.pallino.it <http://www.pallino.it/>



Questa e-mail ed i suoi eventuali allegati contengono informazioni riservate o confidenziali.
Se avete ricevuto questa comunicazione per errore, siete pregati di non utilizzarne il contenuto 
e di non portarlo a conoscenza di alcuno. Grazie per la collaborazione.
This message is intended only for the use of the individual or entity to which it is addressed, 
and may contain confidential information. If you received this in error, please contact the sender
and delete the material from all computers.













More information about the TYPO3-english mailing list