open a file with its default programme

前端 未结 6 1783
旧时难觅i
旧时难觅i 2021-01-23 10:40

In my application I want to open some files with the correct default programmes, like .doc file should be open with WORD and .psd files should be opened with Photoshop if it is

6条回答
  •  轮回少年
    2021-01-23 11:31

    Browsers typically don't have access to the computer's filesystem for security reasons. If you know the exact path to a file you can point the browser at it using a file: URI, e.g.

    file:///C:/path/to/file.ext

    You may also be able to do this with a plugin, eg ActiveX, however I am unsure as to what security measures that would have.

提交回复
热议问题