How open a local file with the associated program from a web page?

前端 未结 6 1598
萌比男神i
萌比男神i 2021-01-23 23:25

I know the user of my app has a local file named c:\\sourcefile.cs, I need to find a way to render a link to that file so that when he clicks the link, it will open the file in

6条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-23 23:45

    I don't know about opening in visual studio, but this might work:

    file:///c:/sourcefile.cs
    

    It depends on browser, browser settings, and of course file associations.

提交回复
热议问题