Cannot open local file - Chrome: Not allowed to load local resource

后端 未结 14 1488
不知归路
不知归路 2020-11-22 12:01

Test browser: Version of Chrome: 52.0.2743.116

It is a simple javascript that is to open an image file from local like \'C:\\002.jpg\'

function run(         


        
14条回答
  •  情话喂你
    2020-11-22 12:54

    You won't be able to load an image outside of the project directory or from a user level directory, hence the "cannot access local resource warning".

    But if you were to place the file in a root folder of your project like in {rootFolder}\Content\my-image.jpg and referenced it like so:

    
    

提交回复
热议问题