79198147

Date: 2024-11-17 20:59:09
Score: 2
Natty:
Report link

Use new method https://github.com/electron/electron/blob/main/docs/api/web-utils.md#webutilsgetpathforfilefile

// Before
const oldPath = document.querySelector('input').files[0].path

// After
const { webUtils } = require('electron')
const newPath = webUtils.getPathForFile(document.querySelector('input').files[0])
Reasons:
  • Probably link only (1):
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Александр Мочалов