Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

nornagon
Copy link
Contributor

@nornagon nornagon commented May 6, 2024

Description of Change

It's time.

Checklist

Release Notes

Notes: Removed nonstandard File.path extension from the Web File API.

@nornagon nornagon requested review from a team as code owners May 6, 2024 21:19
@nornagon nornagon added semver/major incompatible API changes no-backport target/31-x-y PR should also be added to the "31-x-y" branch. labels May 6, 2024
Copy link
Member

@erickzhao erickzhao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docs: lgtm

Removing a Custom DOM Elements doc feels so good 🔥

Copy link

@electron-docs-reviewer electron-docs-reviewer bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving on behalf of the Electron Docs Team

@dsanders11
Copy link
Member

Are we purposely not giving this a full deprecation cycle and going straight to yanking it?

@nornagon
Copy link
Contributor Author

nornagon commented May 6, 2024

Are we purposely not giving this a full deprecation cycle and going straight to yanking it?

It was quasi-deprecated in #38776, though it didn't get a breaking-changes.md callout.

@nornagon nornagon removed the target/31-x-y PR should also be added to the "31-x-y" branch. label May 6, 2024
@nornagon
Copy link
Contributor Author

nornagon commented May 6, 2024

Moved the deletion to 32.x

@electron-cation
Copy link

electron-cation bot commented May 6, 2024

🪦 Deprecation Checklist

🗑️ Previous deprecations being removed in this PR

  • 🏷️ Pull request is labeled as semver/major incompatible API changes
  • 📢 Are called out as removed in docs/breaking-changes.md
  • 📝 Are fully removed from the docs
  • ⌨️ All relevant code is removed

@electron/wg-releases: Please confirm these deprecation changes conform to our deprecation policies listed in docs/breaking-changes.md, then check the applicable items in the checklist and remove any non-applicable items.

Copy link
Member

@ckerr ckerr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this @nornagon and also thanks @MarshallOfSound for #38776

Copy link
Member

@ckerr ckerr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

API LGTM

Copy link
Member

@jkleinsc jkleinsc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

API LGTM

docs/breaking-changes.md Outdated Show resolved Hide resolved
@nornagon nornagon merged commit 19dc276 into main May 15, 2024
@nornagon nornagon deleted the remove-file-path branch May 15, 2024 18:07
@release-clerk
Copy link

release-clerk bot commented May 15, 2024

Release Notes Persisted

Removed nonstandard File.path extension from the Web File API.

@Makio64
Copy link

Makio64 commented Aug 13, 2024

Whats replacing : File.path ?
Concrate case : user drag a file and the electron app want to save the new version in the same folder, how to know what's the original folder ?

@MarshallOfSound
Copy link
Member

@Makio64 Check the breaking changes doc: https://github.com/electron/electron/blob/main/docs/breaking-changes.md#removed-filepath

@xdmitrii
Copy link

xdmitrii commented Jan 8, 2025

@MarshallOfSound @erickzhao

Is it possible to get file paths for all dropped files? I tried with example provided in the above comment:

for (const file of files) {
    const path = webUtils.getPathForFile(file);
    console.log(path);
}

But this method only works when I do:

const file = files[0];

Does this method work only for the first file in the list?

@Bug-Reaper
Copy link

Bug-Reaper commented Mar 30, 2025

@xdmitrii

@MarshallOfSound @erickzhao

Is it possible to get file paths for all dropped files? I tried with example provided in the above comment:

for (const file of files) {
    const path = webUtils.getPathForFile(file);
    console.log(path);
}

But this method only works when I do:

const file = files[0];

Does this method work only for the first file in the list?

Sounds like some type of bug (or security measure) where it doesn't work when you reassign access via const file? I'd try a normal for loop:

for (let i=0;i<files.length;i++){
  console.log(webUtils.getPathForFile(files[i]))
}

I actually need to handle multi-file eventually and can revisit this if I remember.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: 🗑 Complete

Development

Successfully merging this pull request may close these issues.

9 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.