# How to create a url to retrieve data from a local file or from ftp

**URL:** <https://discuss.elastic.co/t/how-to-create-a-url-to-retrieve-data-from-a-local-file-or-from-ftp/92832>\
**Category:** Kibana\
**Created:** [July 12, 2017, 3:17pm UTC](https://discuss.elastic.co/t/how-to-create-a-url-to-retrieve-data-from-a-local-file-or-from-ftp/92832 "2017-07-12T15:17:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![vaddanam](https://avatars.discourse-cdn.com/v4/letter/v/7bcc69/32.png) [@vaddanam](https://discuss.elastic.co/u/vaddanam)\
**Post date:** [July 12, 2017, 3:17pm UTC](https://discuss.elastic.co/t/how-to-create-a-url-to-retrieve-data-from-a-local-file-or-from-ftp/92832/1 "2017-07-12T15:17:27Z")

</div>

Hi Team,  
I need help in creating a url in kibana discover page. When clicked on it it needs to fetch the file contents from a local system or from ftp location.  
I already followed the steps to create uri out of teh data populated in the column. But it is giving {"statusCode":404,"error":"Not Found","message":"Unknown app D:/test/Sample\_JSON.txt"} error message.

Thanks & Regards  
Srinivas

---

<div class="post-metadata">

**Author:** ![spalger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spalger/32/14092_2.png) [@spalger](https://discuss.elastic.co/u/spalger)\
**Post date:** [July 13, 2017, 12:27am UTC](https://discuss.elastic.co/t/how-to-create-a-url-to-retrieve-data-from-a-local-file-or-from-ftp/92832/2 "2017-07-13T00:27:44Z")

</div>

I think that browsers will prevent this from working but assuming it's possible, make sure to use the `file:/` protocol in your url.

 ![](https://us1.discourse-cdn.com/elastic/original/3X/5/3/53f05594964dd4653d5eb7be3f3c98ac8512f78e.png)

---

<div class="post-metadata">

**Author:** ![vaddanam](https://avatars.discourse-cdn.com/v4/letter/v/7bcc69/32.png) [@vaddanam](https://discuss.elastic.co/u/vaddanam)\
**Post date:** [July 27, 2017, 4:29pm UTC](https://discuss.elastic.co/t/how-to-create-a-url-to-retrieve-data-from-a-local-file-or-from-ftp/92832/3 "2017-07-27T16:29:35Z")

</div>

I am using the FTP connection here to retrieve the file. I am not interested in hard coding the ftp username and pwd in link.

---

<div class="post-metadata">

**Author:** ![rashmi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rashmi/32/16391_2.png) [@rashmi](https://discuss.elastic.co/u/rashmi)\
**Post date:** [July 27, 2017, 5:36pm UTC](https://discuss.elastic.co/t/how-to-create-a-url-to-retrieve-data-from-a-local-file-or-from-ftp/92832/4 "2017-07-27T17:36:13Z")

</div>

There is no way in the FTP URL syntax to ask the user agent to prompt for a user name. Either you provide a fixed user name (with or without a password) in the URL or no user name, in which the user name anonymous is used. Instead of providing directly a link with an FTP URL, present an HTML form which asks for the username; make the script which processes the form send a 301 (temporarily moved) response, substituting the received username into the URL in the Location header.

Let us know if this helps...

Thanks  
Rashmi

---

<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:** [August 24, 2017, 5:36pm UTC](https://discuss.elastic.co/t/how-to-create-a-url-to-retrieve-data-from-a-local-file-or-from-ftp/92832/5 "2017-08-24T17:36:31Z")

</div>

Closed on August 24, 2017, 5:36pm UTC

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