-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feat] Adding file association functionality. #3736
Comments
For reference and some hints: #918. Edit: You can keep this issue open since the other one's closed without being generally resolved. |
Some simple research: Window: registry + launch args |
Are there any updates? I'm currently pretty new to tauri and still learning a lot, but I can't figure out how to open files with my app selected for opening it. I added a CLI which opens the first parsed file and I have a button to open files. But when I open a document with macOS, I get the error that my app doesn't support PDF. Sadly, displaying PDF is its only purpose. I would love some help or a hind in the right direction. |
I asked for a related feature here: https://discord.com/channels/616186924390023171/1110215400047784058 and got forwarded to this ticket. In my case I want to open files with my tauri app (text editor) through the terminal. E.g. with |
Hmm I'm running into this exact issue now and can't seem to figure out how to get around it. I was hoping that one of the args passed in to the application when opened would be the file path, but that doesn't seem to be the case. Any thoughts on how to get the file path for the file that was clicked to open the Tauri app? I've tried using |
Windows can have file associations through wix/nsis templates. |
Hope to support this feature soon, it's a very common requirement for most file-viewing programs |
@lucasfernog I'm not seeing file associations within the tauri docs. Should this issue actually be closed yet? Seems like it hasn't fully made it in? |
It's a v2 feature and it isn't documented yet @tnrich. @lorenzolewis do we have a place we're tracking pending features to be documented? |
Thanks @lucasfernog and @tnrich ! I've created an issue to track here: tauri-apps/tauri-docs#1526 For anything else that we need to track to be documented feel free to add an issue in that repo and link any respective PRs. @lucasfernog I use https://github.com/tauri-apps/tauri-docs/milestone/4 as the to-do list so if you can just make sure any issues are added to that milestone that gets it on the official™️ list. |
Just adding this here as a reference: https://github.com/tauri-apps/tauri/tree/dev/examples/file-associations (windows and linux) for Mac – use tauri-plugin-deep-link |
I realize that this approach is a good way to get the TAURI program started for the first time, but is there a sample like Electron's |
To double down on what @ryusei-48 said, it seems this peculiar behavior works well on macOS thanks to the Opened event, but I cannot manage to make things work the same for Linux/Windows. Combining things with the single-instance plugin makes things even more cryptic. |
@martpie The way this is usually implemented is to open a pipe/socket on the first instance of the app and when OS launches another instance because user double clicked a file in explorer then the new instance tries to open the same pipe/socket, fails, sends the path to the first instance that is listening on the pipe/socket and then exits. That's how I did it in my tauri app too. |
Describe the problem
At this time, I can't double-click or right-click on a file to launch an app.
Describe the solution you'd like
I would like to be able to configure file associations via
tauri.config.json
.Alternatives considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: