Skip to content

Observable Desktop app unable to import from parent directory #53

Answered by mbostock
rreusser asked this question in Q&A
Discussion options

You must be logged in to vote

As you surmised this design is for security purposes; you can only import files in the same directory as (or a subdirectory of) the current notebook. The same is true for file attachments.

Apart from the symlink workaround, I was thinking that we might be able to use a project configuration file, say observable.config.js, in a parent directory to signify a project root. If this file isn’t present, the current limitations apply; but if it is found, then you can access any file in the project. The downside of this approach is that we’d have to crawl up the parent directories to look for said config file, and it’s possible that you might accidentally expose too much if you put a project conf…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@rreusser
Comment options

@mbostock
Comment options

Answer selected by rreusser
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants