Visualizer - pass file from html

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.

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.

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

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

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.