Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove files correctly when using unlink #1

Open
mieserfettsack opened this issue Oct 3, 2021 · 1 comment
Open

Remove files correctly when using unlink #1

mieserfettsack opened this issue Oct 3, 2021 · 1 comment

Comments

@mieserfettsack
Copy link

This part is not working as expected. No file was deleted when using your extension.

$filename = Environment::getPublicPath() . '/' . $deleteFile->getPublicUrl();

This creates a URL with eID inside. It points to the correct file but unlink can not handle it. I am not a PHP nor TYPO3 developer but I tried the follwoing to test, if dupliactes are deleted.

unlink(Environment::getPublicPath() . "/fileadmin" . $deleteFile->getProperty("identifier"));

I was not able to figure out how to get the storage path therefore hardcoded the string "/fileadmin".

Proposal

  1. Use some TYPO3 command to delete the file with getPublicUrl
  2. create a path that unlink can use
@mieserfettsack
Copy link
Author

mieserfettsack commented Oct 3, 2021

I offered a reward to solve this issue: https://www.mintme.com/token/MDYS/posts/Need-help-Pay-EUR-10-to-solve-the-problem-2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant