i’m having trouble browsing to a network location from Dash dcc.button.
i have used most common methods for that, including subprocess, open, os.system etc…
I had some success when Dash app running locally (windows machine) and browse over to localhost (127.0.0.1)
But it never worked on Linux server, when dash app is on Linux and clients are windows. (so the callback is working.)
I’m aware of the usage of 2 slash \ “\” to get 1 slash \ “\”, and also tried // / considering dash is running on Linux, didn’t found any mathcing set to work. the UNC path for the smb share i’m trying is : \192.168.6.10\Open or using DNS server locally: \fileserver\Open. Those options are working with subprocess.Popen and os.system(r’explorer “\192.168.6.10\Open”') when running locally, but not on Linux.
So this is the dcc.button, dash app is hosted on Linux machine on local network, clients are windows.
the clients have that mounted. I just need the button to execute a local operation for browsing (clients are windows).
Does this still needs the Linux server , serving the dash app to have that mounted ?
Hello Jinny, is suppose to open a network path SMB share \192.168.6.10\abc\abc
not a file. The location is accessible from both , windows and linux servers, serving the dash app.
Clients are all on windows. I’m using os.system() command in the function of callback.
@jinnyzor hello !! i did some test on windows server , debian server with mounted and unmounted SMB shares so i can identify what is the problem.
the problem is that the command in dcc.button, for example
[subprocess.Popen(r’explorer /open,“\192.168.6.40\smb”') ] which is working , is not executed on the client web interface, is executed on the server !!!
for example, i have run dash app on windows server , and when the dcc.button is clicked and activate the subprocess.popen command, the command executed on the server system, because i found a lot of windows open on that path when i remote in.
So, is there any way to execute commands on the client side when dash app running on server ?
Thank you @jinnyzor.
We are in the middle of developing systems , and we have a mess in the team on how we provide information to each other, so i setup a dash server locally to redirect all the information from a central location, that resides on the SMB local server.
so the option of link ‘file://///…’ works perfect on firefox, it just needs to hit enter again and is able to browse the SMB server within firefox while using the client permissions.
for chrome clients, ‘file://…’ works when right click-> copy link and then paste in new window.
So if the target goes to folder, that method is browsing the folder, if path going to file, that file is opening, for example excel file. Is enough for our purpose ! Thanks a lot.