“Not allowed to load local resource: file:///C:…jpg” Java EE Tomcat

后端 未结 8 1478
忘了有多久
忘了有多久 2020-11-29 06:36

I\'m trying to retrieve a picture from my file system after a good storage,(instead of putting it in the database I copy it to the disc and i put the path to the db)

8条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-29 06:58

    In Chrome, you are supposed to be able to allow this capability with a runtime flag --allow-file-access-from-files

    However, it looks like there is a problem with current versions of Chrome (37, 38) where this doesn't work unless you also pass the runtime flag --disable-web-security

    That's an unacceptable solution, except perhaps as a short-term workaround, but it has been identified as an issue: https://code.google.com/p/chromium/issues/detail?id=379206

提交回复
热议问题