[TYPO3-dev] Howto define processedFiles folder for each feuser within extension

Frans Saris franssaris at gmail.com
Sat Sep 10 11:46:08 CEST 2016


Hi Andreas,

The core makes sure all processed files are deleted when the original file
is deleted (if you use the api or BE filelist to remove the file).

To protect the uploaded files I can recommend to use ext:fal_securedownload
that will provide the necessary checks or can be used as an example how to
implement the permission check/handling.

Groet Frans

Op za 10 sep. 2016 09:45 schreef Andreas Haubold <info at andreas-haubold.de>:

> Hello TYPO3 community!
>
> After working through Helmut Hummels upload example (
> github.com/helhum/upload_example) I got it working under TYPO3 7.6 and
> trying to customize the upload for a project.
>
> The goal is to have feusers upload their files to a specific user folder
> within the file storage of the extension. The file storage record of the
> extension has uid=2 and is located in /uploads/tx_myextension, the feuser
> belongs to an account which has e.g. the accountUid=16. So the upload
> folder of the user might be '2:/16' which points to
> '/uploads/tx_myextension/16/'. The upload to this folder works fine.
>
> 1.) The first question is about how to show images/files only for logged
> in users. Images are rendered with index.php?eID=dumpFile... and I didn't
> found any approach how to implement a permission check before the image is
> rendered (e.g. by using a slot). Users should only have access to images of
> the account to which they have access.
>
> 2.) My second question is about how to handle proccessed images correctly.
> Currently all proccessed files are located within
> /uploads/tx_myextension/_processed_/ The better way would be to have all
> files within the account folder ('/uploads/tx_myextension/16/_processed_')
> of each user. So if an account will be deleted all images and processed
> images will be removed easily also.
> Is there a way to override the processingFolder of a storageRecord for
> each logged in user? I only found the getProcessingFolder() method within
> \TYPO3\CMS\Core\Resource\ResourceStorage but no setter method.
>
> Thank you very much for any help!
>
> Andreas
> _______________________________________________
> TYPO3-dev mailing list
> TYPO3-dev at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-dev
>



More information about the TYPO3-dev mailing list