# Problem accessing file from base URL in Kibana 7.8

**URL:** <https://discuss.elastic.co/t/problem-accessing-file-from-base-url-in-kibana-7-8/244784>\
**Category:** Kibana\
**Created:** [August 12, 2020, 9:14pm UTC](https://discuss.elastic.co/t/problem-accessing-file-from-base-url-in-kibana-7-8/244784 "2020-08-12T21:14:21Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ssimmons](https://avatars.discourse-cdn.com/v4/letter/s/e5b9ba/32.png) [@ssimmons](https://discuss.elastic.co/u/ssimmons)\
**Post date:** [August 12, 2020, 9:14pm UTC](https://discuss.elastic.co/t/problem-accessing-file-from-base-url-in-kibana-7-8/244784/1 "2020-08-12T21:14:21Z")

</div>

I'm converting a plugin from Kibana 7.5 to 7.8. In my code I grab an .xlsx file that is stored in a `data` directory in the public folder of my plugin. This works in 7.5 but does not work in 7.8. I'm grabbing this file:

```auto
/kibana/plugins/my_plugin/public/data/test.xlsx

```

by using the URL like this:

```auto
http://localhost:5603/ghq/plugins/my_plugin/data/test.xlsx 

```

As I stated, this works in 7.5 but not in 7.8. Is there something special I need to do in 7.8 to allow access to this file? I posted a response to another guy with a similar question and a response he received was to do exactly what I'm doing. That user used the Kibana `home` plugin as an example of how to grab one of the images that is stored in the `assets` directory of that plugin. I can grab that image from the URL:

```auto
http://localhost:5603/ghq/plugins/home/assets/aws_metrics/screenshot.png

```

I can also place my `test.xlsx` file within the `/home/public/assest/aws_metrics` directory and pull it from the URL. However I cannot pull files from the URL with any plugin that I create in 7.8. Is there some `server` setting that I'm missing with my plugin to allow me to access files from the URL?

---

<div class="post-metadata">

**Author:** ![markov00](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/markov00/32/33316_2.png) [@markov00](https://discuss.elastic.co/u/markov00)\
**Post date:** [August 13, 2020, 9:11am UTC](https://discuss.elastic.co/t/problem-accessing-file-from-base-url-in-kibana-7-8/244784/2 "2020-08-13T09:11:08Z")

</div>

Hi @ssimmons  
In 7.8 we are moving toward a new plugin/platform system. We will keep the legacy plugin world until 8.0.  
If your plugin is already using the new platform (see [https://github.com/elastic/kibana/blob/master/src/core/MIGRATION.md](https://github.com/elastic/kibana/blob/master/src/core/MIGRATION.md)) then your static files are served from within the your plugin `/public/assets` folder and accessed through `/plugins/{id}/assets/{path*}` URL.

---

<div class="post-metadata">

**Author:** ![ssimmons](https://avatars.discourse-cdn.com/v4/letter/s/e5b9ba/32.png) [@ssimmons](https://discuss.elastic.co/u/ssimmons)\
**Post date:** [August 13, 2020, 1:01pm UTC](https://discuss.elastic.co/t/problem-accessing-file-from-base-url-in-kibana-7-8/244784/3 "2020-08-13T13:01:08Z")

</div>

Thank you for pointing me in the right direction. I am using the new plugin/platform system. I had already tried adding an `assets` folder and accessing files through that folder and it is still not working for me. I created an `assets` folder and placed a file called `icon.png` in it. It still give me a 404 when I try to access this file. I'm using Kibana 7.8.0. I've created two more plugins just to test this and I'm getting a 404 with all of them. My file is located here:

```auto
/kibana/plugins/expr_example/public/assets/icon.png

```

And I'm trying to access it from here (my current path is `qkh`):

```auto
http://localhost:5603/qkh/plugins/expr_example/assets/icon.png

```

And it's giving me a 404 error. Is there any special permissions on the `assets` folder that I need to set?

---

<div class="post-metadata">

**Author:** ![ssimmons](https://avatars.discourse-cdn.com/v4/letter/s/e5b9ba/32.png) [@ssimmons](https://discuss.elastic.co/u/ssimmons)\
**Post date:** [August 13, 2020, 2:20pm UTC](https://discuss.elastic.co/t/problem-accessing-file-from-base-url-in-kibana-7-8/244784/4 "2020-08-13T14:20:48Z")

</div>

I finally found the issue with not being able to access the `assets` folder in Kinbana 7.8. It appears to be related to the naming of the plugin. If you include underscores "\_" within the plugin name, then you will not be able to access the `assets` folder. So I had to create a new plugin named `dodequities` instead of `dod_equities`. Now I can access the `assets` folder.

---

<div class="post-metadata">

**Author:** ![markov00](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/markov00/32/33316_2.png) [@markov00](https://discuss.elastic.co/u/markov00)\
**Post date:** [August 13, 2020, 3:57pm UTC](https://discuss.elastic.co/t/problem-accessing-file-from-base-url-in-kibana-7-8/244784/5 "2020-08-13T15:57:54Z")

</div>

Good that you have found the issue, it’s important to note that the plugin `id` does not necessarily match the directory name. It’s the `id` that is used in the URL path, not the directory name, so please check your plugin id on the `kibana.json` file and use that in the url path

---

<div class="post-metadata">

**Author:** ![ssimmons](https://avatars.discourse-cdn.com/v4/letter/s/e5b9ba/32.png) [@ssimmons](https://discuss.elastic.co/u/ssimmons)\
**Post date:** [August 13, 2020, 4:28pm UTC](https://discuss.elastic.co/t/problem-accessing-file-from-base-url-in-kibana-7-8/244784/6 "2020-08-13T16:28:28Z")

</div>

Ah, now I see. I was able to create a plugin with an underscore in the name and access the `asset` folder for that plugin. By default it appears to remove the underscore and camel case the next word in the plugin when creating the actual `id`. So the plugin I created was `dod_equities` and the `id` within the `kibana.json` file was set as `dodEquities`. I was able to access the assets folder using the `id` of `dodEquities`. Thanks for this clarification.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 10, 2020, 4:28pm UTC](https://discuss.elastic.co/t/problem-accessing-file-from-base-url-in-kibana-7-8/244784/7 "2020-09-10T16:28:47Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
