Repository navigation
Added Support for File Drop - #1134
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟢 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.getPathForFilethrough 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
pr-comment: Run #177
🎉 All tests passed!Github Test Reporter by CTRF 💚 🔄 This comment has been updated |
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.getPathForFileavailable 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.