Leuchtfeuer / typo3-secure-downloads

Secure your assets and data from unwanted download. Apply TYPO3 access rights to ALL file assets (PDFs, TGZs or JPGs etc. - configurable) - protect them from direct access.
https://www.Leuchtfeuer.com
GNU General Public License v2.0
21 stars 35 forks source link

Disable secure link on proccessed image files #196

Closed ste101 closed 8 months ago

ste101 commented 8 months ago

I would like to habe proccess image files of PDFs without the secure link. How could this be achieved?

balasch commented 8 months ago

Do I understand correctly? You want to have unprotected preview images of protected PDFs? Unfortunately, this is not provided for in the extension. I would suggest that you write your own event listener based on the template of the exiting Classes/EventListener/SecureDownloadsEventListener.php, which does not create a secure link in the case of preview images. To do this, you must adapt onResourceStorageEmitPreGeneratePublicUrlSignal accordingly. See https://github.com/Leuchtfeuer/typo3-secure-downloads/blob/9cd4b2d71ca00393b880b69892163442fe548835/Classes/EventListener/SecureDownloadsEventListener.php#L44-L71

ste101 commented 8 months ago

Thank you very much for your answer. Quick and dirty deleting || $resource instanceof ProcessedFile works.