Skip to content

Added Support for File Drop - #1134

Merged
FlorianRappl merged 2 commits into
developfrom
feature/file-drop
Nov 26, 2026
Merged

FlorianRappl merged 2 commits into
developfrom
feature/file-drop

Conversation

@FlorianRappl

Copy link
Copy Markdown
Collaborator

This pull request adds support for accessing file system paths of dropped files in Electron.NET applications by exposing a new helper function in the renderer process. It introduces a preload script that makes window.electronNET.getPathForFile available in all renderer contexts, regardless of security settings. Documentation and sidebar navigation are updated to guide users on how to use this feature in both JavaScript and Blazor scenarios.

@FlorianRappl FlorianRappl added this to the 0.7.0 milestone Nov 26, 2026
@FlorianRappl
FlorianRappl requested a balanced review from Copilot November 26, 2026 10:55
@FlorianRappl FlorianRappl changed the title Feature/file drop Added Support for File Drop Nov 26, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are reported for the renderer file-path helper and session preload changes.

No open issues 🎉

What changed in this PR

Adds a renderer helper for retrieving filesystem paths from dropped or selected files in Electron.NET applications, using a session-level preload alongside application-provided preload scripts.

Changes:

  • Exposes window.electronNET.getPathForFile through the appropriate mechanism for the renderer’s context-isolation setting.
  • Registers the host preload for newly created sessions and the default session.
  • Adds JavaScript and Blazor usage examples, sidebar navigation, and release notes.
File Description
src/​ElectronNET.Host/​scripts/​host-preload.js Exposes the file-path helper to renderer pages.
src/​ElectronNET.Host/​main.js Registers the host preload once per session.
docs/​Using/​File-Drop.md Documents file-path retrieval with JavaScript and Blazor examples.
docs/​_Sidebar.md Links to the new file-drop guide.
Changelog.md Adds release notes for the file-path helper and WebContentsView support.

Review effort: Balanced

@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

pr-comment: Run #177

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Pending ⏳ Other ❓ Flaky 🍂 Duration ⏱️
1584 1444 0 0 0 140 0 9m 36s

🎉 All tests passed!

Github Test Reporter by CTRF 💚

🔄 This comment has been updated

@FlorianRappl
FlorianRappl merged commit b4fdaaf into develop Nov 26, 2026
29 of 31 checks passed
@FlorianRappl FlorianRappl linked an issue Nov 26, 2026 that may be closed by this pull request
@FlorianRappl
FlorianRappl deleted the feature/file-drop branch November 27, 2026 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for File Drop

2 participants