Describe the Bug
When a file uploaded to Payload CMS has a # character in its filename, downloading it via the REST API returns a 404:
{"message":"Route not found \"/api/media/file/document #123.pdf\""}
Link to the code that reproduces this issue
pnpm dev directly in payload can use the repo steps
Reproduction Steps
- Upload a file with # in the filename (e.g.,
document #123.pdf)
- Try to access it via the admin panel
- Returns 404 instead of the file
Which area(s) are affected?
Not sure
Environment Info
Payload v3.78.0
Node v24.13.1
Next 16.2.0-canary.54
Describe the Bug
When a file uploaded to Payload CMS has a
#character in its filename, downloading it via the REST API returns a 404:{"message":"Route not found \"/api/media/file/document #123.pdf\""}Link to the code that reproduces this issue
pnpm devdirectly in payload can use the repo stepsReproduction Steps
document #123.pdf)Which area(s) are affected?
Not sure
Environment Info