Skip to content

Impossible to edit files outside of root [Local Storage Mode] #1431

@m4rrc0

Description

@m4rrc0

Hey.

I need to edit content files outside of the project root but the getIsPathValid function is preventing me to do so.

Is there an important reason to prevent this in local mode? I would think we are responsible to check (and validate if necessary) our paths ourselves when in local mode since it only impacts our file system...

If this validation step is kept as is, could we have an option flag to disable it manually? Maybe an options key could be added to the LocalStorageConfig and allow a options.bypassPathValidation = true to bypass the getIsPathValid function entirely or make it always return true.

I am happy to make a PR once a course of action has been accepted by the team.

Alternative methods tried and failed

I tried to symlink my external content folder to a local folder but it is not working either. Probably fs not following symlinks? I would consider this problem fixed if I could properly access a symlinked folder.

I even tried manually copying over the files but then I want to gitignore them and when I do I cannot access them any more. I tried fiddling with the Vite config but could not make keystatic 'unignore' files... I would not consider this problem fixed if I get this working... it is more like an band-aid.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions