Closed elements-team closed 2 years ago
Hi,
maybe we add a property
public $isAbsoluteFilePath = false;
to the Action\Download.php class. When this is set to "true" -> we don't prepend the PIMCORE_PROJECT_ROOT . So you can store the absolute File path and retrive it later on?
I guess it's just important that it is backward compatible :-)
Best regards
Good idea. I added a PR (already tested with my setup): https://github.com/elements-at/ProcessManager/pull/148/commits/9ab71376833552fb750324b454d18f2e8ff16326
Added with PR - thx
Use case / Problem:
In a pipeline deployment setup, the private var is set to be outside the
PROJECT_ROOT
directory:PRESALES_PIMCORE_PRIVATE_VAR="/home/presales/var_pimcore/private"
But for the process manager, files must be always located inside the root directory:
$file = PIMCORE_PROJECT_ROOT.$actionData['filepath'];
$file = PIMCORE_PROJECT_ROOT.$actionData['filepath'];
Solution Suggestion
1) Add a setter to overwrite the root directory with the project specific root. Flexible + easy to extend; ignore security risk? 2) Always use the
PIMCORE_SYSTEM_TEMP_DIRECTORY
as the root instead ofPIMCORE_PROJECT_ROOT
(simple + effective solution, but probably isn't downward compatible).