1

When passing across a file location from eel to JavaScript, the image fails to load due to this error:

index.html:1 Not allowed to load local resource: file:///C:/Users/dave/Desktop/tools-and-utensils.png

Does the Eel python library allow the use of local files since it is running on a local host and not a web server? If so, how can I combat this? JavaScript is reading the path from a JSON string to load in the file.

1 Answers1

0

Perhaps try to move the python file TO the desktop and just call "tools-and-utensils.png"

BurntRanch
  • 3
  • 1
  • 5
  • I want this to eventually pull in images from a network folder for headshots of company employees. i dont want to copy the images to the users desktop, but rather display them directly from the network share. Can eel accomplish this? I was hoping to avoid Electron but that might have to be the way to go as it seems it can load local files (tested the same with Electron using JavaScript and it loaded in the file just fine - but would rather use Python) – BigBlueMonster Mar 08 '21 at 08:31
  • Not an expert with eel, but i do know about files. – BurntRanch Mar 08 '21 at 13:13
  • @BigBlueMonster if you use IPs then you can. – BurntRanch Mar 08 '21 at 13:13