beechit / fal_securedownload

An extension for TYPO3 CMS which adds secure downloads to FAL
36 stars 62 forks source link

Download is not working properly after updating to 4.0.2 #196

Closed mediaessenz closed 1 year ago

mediaessenz commented 2 years ago

The problem is the change came with commit 54b1a4513360d1111d91c451d622e654304daba3 in the FileDumpHook::fileDumpContens method:

[pre commit]  $downloadName = $file->getProperty('download_name') ?: $file->getName();
[new] $downloadName = $file->hasProperty('download_name') ? $file->getProperty('download_name') : $file->getName();

The problem is, that $file->hasProperty('download_name') is alway true, if the sysext:filemetadata is installed.

Changing this line to the following solves the issue:

$downloadName = $file->hasProperty('download_name') && $file->getProperty('download_name') ? $file->getProperty('download_name') : $file->getName();
FamousWolf commented 2 years ago

@mediaessenz Do you want to create a PR for this (so you get the credit) or do you want me to do it?

mediaessenz commented 2 years ago

I will do it :-)

FamousWolf commented 2 years ago

Thanks. I'll test and merge it tomorrow.

FamousWolf commented 2 years ago

Unfortunately I didn't have time for this yesterday. I've moved it to Friday.

aWuttig commented 1 year ago

@FamousWolf Could you please release a new version 4.0.3 with the fix.

FamousWolf commented 1 year ago

@aWuttig I was waiting for a reply to a different issue, but they're not replying. So I just released 4.0.3.