-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Allow registering an app as a file handler #918
Comments
did u mean file/directory selection dialog? |
No... Imagen i've created my app (it's named 'myCoolApp'). Then i want to right click on a file on my desktop an select 'open with' -> myCoolApp. In that case, somehow the app (after started by the operation system) has to know what to do (in my case open the correct file). With electron you can register the above mentioned open-file-event-handler and react on the open action (by opening the file). |
maybe not support yet #544 |
hope this can help you @ehhc |
I've updated the title to what I think more closely resembles your problem. If that does't seem accurate to you, let me know. |
For Windows, you can do this in the installer. My project has this functionality; here are the relevant blocks of code: https://github.com/WilliamVenner/gmpublisher/blob/master/src-tauri/msi/msi.wxs#L60-L80 https://github.com/WilliamVenner/gmpublisher/blob/master/src-tauri/msi/msi.wxs#L43-L47 https://github.com/WilliamVenner/gmpublisher/blob/master/src-tauri/tauri.conf.json#L42-L46 Good luck!! |
Could you please paste some code to see how it could be implemented? |
First of all, this is an old repo (2y), so many things about Tauri have changed in the meantime but the last comment before yours already has code snippets that show exactly how this can be archived. There is nothing new to add here. |
@JonasKruckenberg i opend this issue some time ago. So -- at least for me -- it's not relevant anymore. I understand that it still might be relevant for others, but with the solution given by the comment of @WilliamVenner (#918 (comment)) it might be a good idea to close this issue. Should i do it? Or do you contributors want to do it (I'm not sure whether that matters for the githube issue workflow/statistics/whatever).. |
If this issue is solved for you then feel free to close this issue. One can always create a new issue after all. |
I have the same demand for append |
Hey there,
i want to develope a simple editor with tauri. Currently i'm wondering how i can react on fileOpenEvents (resp. whether there are even such things..). In Electron i could do the following:
ipcRenderer.on('open-file', (e, url) => this.openFile(url));
Can you tell me what the corresponding tauri way is?
Thanks in advance
The text was updated successfully, but these errors were encountered: