Displaying images with spaces in path when using Electron (windows)

Viewed 275

I've got a rather straightforward problem. Some of my users insist on using spaces in their directory/file names (and use windows). This sadly breaks the images in my app as the directory isn't read correctly. For example

C:\Users\path name\Downloads\image name.jpeg

will open fine on Linux (and mac) but fail on windows. URL encoding (encodeURI) doesn't seem to work and I've found nothing on Google (though this should be a simple problem).

Any suggestions?

1 Answers

Turned out to be a bug with Angular sanitizer.bypassSecurityTrustStyle when trying to use the photos as background images. No obvious solution except moving to regular img tags

Related