Issue with directus installed in sub directory
jbogdani opened this issue · comments
Julian Bogdani commented
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