# Visualizer - pass file from html

**URL:** https://discourse.paraview.org/t/visualizer-pass-file-from-html/1359
**Category:** Development
**Created:** [February 27, 2019, 9:30am UTC](https://discourse.paraview.org/t/visualizer-pass-file-from-html/1359 "2019-02-27T09:30:03Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![ravid.l](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/r/7ea924/32.png) [@ravid.l](https://discourse.paraview.org/u/ravid.l)
#### Post date: [February 27, 2019, 9:30am UTC](https://discourse.paraview.org/t/visualizer-pass-file-from-html/1359/1 "2019-02-27T09:30:03Z")

</div>

In 5.2 version, I see you can write such code in index.html:

```
  Visualizer.connect({
           application: 'visualizer',
           dataFile: 'a.vtk',
           dataDir: ""
       });

```

And in this way - to pass a file name from the html to python.  
Can I do this in 5.6 v?  
Which arguments `connect` function expect to get?

I do not know if it matters, but I am using in cmd to run visualizer by:

> .\bin\pvpython.exe share\paraview-5.6\web\visualizer\server\pvw-visualizer.py --content share\paraview-5.6\web\visualizer\www\ –data “data” --port 8080

Thanks.

---

<div class="post-metadata">

### Author: ![jourdain](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jourdain/32/11_2.png) [@jourdain](https://discourse.paraview.org/u/jourdain)
#### Post date: [February 27, 2019, 4:49pm UTC](https://discourse.paraview.org/t/visualizer-pass-file-from-html/1359/3 "2019-02-27T16:49:05Z")

</div>

The configuration provided in the connect is used by the launcher when starting the application for you dynamically so extra arguments can be provided such as `which file should be loaded at startup`.

In your case, since you start Visualizer by hand first. That configuration object is useless and will have no affect.

---

<div class="post-metadata">

### Author: ![ravid.l](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/r/7ea924/32.png) [@ravid.l](https://discourse.paraview.org/u/ravid.l)
#### Post date: [February 28, 2019, 6:34am UTC](https://discourse.paraview.org/t/visualizer-pass-file-from-html/1359/4 "2019-02-28T06:34:04Z")

</div>

Thanks for your answer.  
Now I run Apache httpd.exe, and follow these insructions:

> **[ParaViewWeb](https://kitware.github.io/paraviewweb/docs/windows_10.html)**
>
> ParaViewWeb on WindowsThis readme described the process of setting up a Paraview Web Server instance on a Windows 10 workstation. Once the ParaView Web is setup, the Visualizer app may be embedded in

And it run, but it does not respond to the data I send from html, like in the question.  
Any help?

By the way, I work with version 5.6, and my launcher.bat file seem so:

> set PV\_HOME=C:\ParaView-5.6.0  
> PV\_HOME\bin\pvpython.exe PV\_HOME\bin\Lib\site-packages\wslink\launcher.py PV\_HOME\launcher.config

---

<div class="post-metadata">

### Author: ![jourdain](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jourdain/32/11_2.png) [@jourdain](https://discourse.paraview.org/u/jourdain)
#### Post date: [February 28, 2019, 3:26pm UTC](https://discourse.paraview.org/t/visualizer-pass-file-from-html/1359/5 "2019-02-28T15:26:02Z")

</div>

What is the content of your `launcher.config`?

You can create custom command that will then use your arguments provided in the config object to properly form the command line you intend to.
