Problem/Motivation
On one of my projects, i am not able to access any private file that is in a subdirectory.
I always get a 404 not found.
A classic url would be : https://site.com/system/files/webform/test/_sid_/test1.pdf
I discover that it was never catched by the route "/system/files/".
The reason seem to be in the processInbound() method that overwrite my request and therefore change the filepath parameter.
Steps to reproduce
Not entiterly sure what in my config generate this issue, but i'm using a multisite.
In my (probably particular config), i just have to create a media with a field "file" wich is parametered to store the file in the private directory.
Then create a new media and uplad a file.
Then see that you cannot access this file.
Proposed resolution
Change the processinbound method to keep the filepath attribute on the request.