Skip to content

Issue with directus installed in sub directory #31

@jbogdani

Description

@jbogdani

When Directus is not installed in the root of the domain but in a sub directory, such as https://example.com/directus the plugin fails to initialise due to a (I believe) typo.

It is looking for files in https://example.com/directusassets/ directory that does not exists and is the result of a missing trailing slash in:
https://github.com/directus/gatsby-source-directus/blob/bfd4f40136dc760a8a9239f19bc691bcf4fb4b40/gatsby-node.js#L93C11-L93C18

In my opinion the line should be (note the slash before assets, that is missing in the main code):

const fileUrl = `${plugin.url}/assets/${file.id}`;

Thank you

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