79432769

Date: 2025-02-12 10:53:30
Score: 1
Natty:
Report link

The path property that Electron adds to the File interface was deprecated and was removed in Electron 32: https://github.com/electron/electron/pull/42053.

Electron recommends using webUtils.getPathForFile (https://www.electronjs.org/docs/latest/api/file-object/) instead.

Your code should look something like this:

const {webUtils} = require('electron')
const filePath = webUtils.getPathForFile(fileObject)
Reasons:
  • Probably link only (1):
  • Low length (0.5):
  • Has code block (-0.5):
Posted by: Siddi