- ๐ช๐ธSpain isholgueras
Core is currently doing for
/system/files/
route.It uses an
InboundPathProcessor
to get the route of the file, set it to a query parameter and return just the/system/files
to allow the route system to match the route, no matter how many/
the file has, because now is in a query parameter.class PathProcessorFiles implements InboundPathProcessorInterface { /** * {@inheritdoc} */ public function processInbound($path, Request $request) { if (str_starts_with($path, '/system/files/') && !$request->query->has('file')) { $file_path = preg_replace('|^\/system\/files\/|', '', $path); $request->query->set('file', $file_path); return '/system/files'; } return $path; } }
Then, in the controller, it gets the target by accessing the
file
query parameter.$target = $request->query->get('file');
- ๐ฌ๐งUnited Kingdom catch
Marking duplicate of the new plan issue which is covering similar ground https://www.drupal.org/project/drupal/issues/3540386 ๐ Explore using more service closures to break deep dependency chains and load fewer services Active
- ๐บ๐ธUnited States smustgrave
Thank you for creating this issue to improve Drupal.
We are working to decide if this task is still relevant to a currently supported version of Drupal. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or is no longer relevant. Your thoughts on this will allow a decision to be made.
Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.
Thanks!
- ๐บ๐ธUnited States rosemarystanley
Here's a reroll attempt of #248 for Drupal 11