Media file paths are stored as absolute, leading to broken links if project directory is moved #12379
sd44
started this conversation in
Feature Requests & Ideas
Replies: 1 comment 1 reply
-
Have you tried setting the staticDir option? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When media files are uploaded to a PayloadCMS instance using the default local file storage, the path to the media file appears to be stored as an absolute path. This becomes problematic if the entire project directory is moved to a different location on the filesystem, leading to "File missing on disk" errors when trying to access these media files via the API (e.g.,
/api/media/file/:filename
).Suggested Solution / Feature Request:
Provide a configuration option to allow users to specify whether media file paths should be stored and resolved relative to the project root (or a configurable media directory).
Beta Was this translation helpful? Give feedback.
All reactions