# Media file generate a bad path

**URL:** <https://forum.getodk.org/t/media-file-generate-a-bad-path/36100>\
**Category:** Support\
**Tags:** odk-central\
**Created:** [December 13, 2021, 3:30pm UTC](https://forum.getodk.org/t/media-file-generate-a-bad-path/36100 "2021-12-13T15:30:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sowe1](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/sowe1/32/13877_2.png) [@sowe1](https://forum.getodk.org/u/sowe1)\
**Post date:** [December 13, 2021, 3:30pm UTC](https://forum.getodk.org/t/media-file-generate-a-bad-path/36100/1 "2021-12-13T15:30:57Z")

</div>

Dear community,  
I'm trying to include a media file in this case a png and I've an error. I'm using this sample

> **[GitHub - XLSForm/example-forms](https://github.com/XLSForm/example-forms)**
>
> Contribute to XLSForm/example-forms development by creating an account on GitHub.

> DNS lookup xx.xx.xx.xx (family:4, host:domain) is not allowed. Because, It is private IP address.Código de error: 500

 ![Error_media](https://getodk.b-cdn.net/uploads/default/original/3X/7/e/7e6258622dbe3d52e83ea01a71e992f7fd151706.png)

log for nginx

```log
10.20.30.11 - - [13/Dec/2021:15:25:13 +0000] "GET /-/media/get/https/odk.palestinercs.org/v1/test/5NSXnL!BELSzuHlZJSOR6TFYhF4TVQfsd$br2W89!qcQuLef$miXS7uu4Y9txj7c/projects/6/forms/start_screen/draft/attachments/hands.png HTTP/1.1" 500 707 "https://odk.palestinercs.org/-/preview/aaNjX0rMovSUZrYzfzVqPPzc7XngrdT" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36"

```

Best

---

<div class="post-metadata">

**Author:** ![sowe1](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/sowe1/32/13877_2.png) [@sowe1](https://forum.getodk.org/u/sowe1)\
**Post date:** [December 29, 2021, 9:36am UTC](https://forum.getodk.org/t/media-file-generate-a-bad-path/36100/2 "2021-12-29T09:36:41Z")

</div>

Hi!  
I'm reviewing the nginx configuration and the enketo configuration and I don't see this path.  
Any idea?  
Best and Merry Christmas

---

<div class="post-metadata">

**Author:** ![danbjoseph](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/danbjoseph/32/21901_2.png) [@danbjoseph](https://forum.getodk.org/u/danbjoseph)\
**Post date:** [December 29, 2021, 6:35pm UTC](https://forum.getodk.org/t/media-file-generate-a-bad-path/36100/3 "2021-12-29T18:35:51Z")

</div>

_I asked a colleague about this. They gave the following response:_

[https://odk.palestinercs.org/v1/test/5NSXnL!BELSzuHlZJSOR6TFYhF4TVQfsd$br2W89!qcQuLef$miXS7uu4Y9txj7c/projects/6/forms/start\_screen/draft/attachments/hands.png](https://odk.palestinercs.org/v1/test/5NSXnL!BELSzuHlZJSOR6TFYhF4TVQfsd%24br2W89!qcQuLef%24miXS7uu4Y9txj7c/projects/6/forms/start_screen/draft/attachments/hands.png) Exists as a direct URI. That local IP gives me a hint that a host file may have been created to point [odk.palestinercs.org](http://odk.palestinercs.org) to a local IP, but the GET from ODK sees it and rejects it as a local address. I have never worked with ODK, so that’s a guess, but I would check DNS and host files on the server.

For example, if I swap it with a different image ([https://odk.palestinercs.org/-/media/get/https/i.picsum.photos/id/229/200/200.jpg?hmac=b3V9uXS2Q1EA1tLHxvWjTgBF4TphN4ibxTjDv2PO2jg](https://odk.palestinercs.org/-/media/get/https/i.picsum.photos/id/229/200/200.jpg?hmac=b3V9uXS2Q1EA1tLHxvWjTgBF4TphN4ibxTjDv2PO2jg)) it works fine. Think this is a DNS issue/host file issue.

I think this might fix it. In Enketo, `allowPrivateIPAddress` is probably set to `false` (default). [https://enketo.github.io/enketo-express/tutorial-10-configure.html](https://enketo.github.io/enketo-express/tutorial-10-configure.html) The actual error being seen is on like line 54 of [https://github.com/enketo/enketo-express/blob/master/test/server/media-controller.spec.js#L54](https://github.com/enketo/enketo-express/blob/master/test/server/media-controller.spec.js#L54)

---

<div class="post-metadata">

**Author:** ![sowe1](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/sowe1/32/13877_2.png) [@sowe1](https://forum.getodk.org/u/sowe1)\
**Post date:** [March 21, 2022, 8:09pm UTC](https://forum.getodk.org/t/media-file-generate-a-bad-path/36100/4 "2022-03-21T20:09:03Z")

</div>

Hi !, Thanks for the feedback, I think we need to change the docker image or I need to change any properties.  
Best
