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

Unnecessary/wrong code to remove in FileDelivery v5.0.6 #215

Open
crealistiques opened this issue Oct 5, 2024 · 1 comment
Open

Unnecessary/wrong code to remove in FileDelivery v5.0.6 #215

crealistiques opened this issue Oct 5, 2024 · 1 comment
Assignees

Comments

@crealistiques
Copy link

In my opinion, the code (line 114-126) in the FileDelivery class should be removed to get the intended functionality!

$fileObject = $this->resourceFactory->retrieveFileOrFolderObject($this->token->getFile());

The code part (lines 114-126) should simply be removed, because otherwise the use of the event in line 111 makes no sense and has no use. The event is very good for manipulating the file to be delivered, which is very handy if I want to deliver a different version of the original file, for example. But if I manipulate $file in an event listener of AfterFileRetrievedEvent, the new/modified $file will not be reflected/used in the returned response/stream!

So please remove the code if that makes sense to you.

Thank you very much for your good work and support!

@balasch
Copy link
Contributor

balasch commented Oct 7, 2024

Many thanks for the tip. We will take a closer look at it.

@balasch balasch self-assigned this Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants