Files
Lucas Fernandes Nogueira 3d6868d09c feat(cli): UTExportedTypeDeclarations support for file associations (#14128)
* feat(cli): UTExportedTypeDeclarations support for file associations

closes #13314

* update example

* update readme
2025-10-07 13:12:39 -03:00

20 lines
669 B
Markdown

# File Associations Example
This example demonstrates how to make associations between the application and certain file types.
This feature is commonly used for functionality such as previewing or editing files.
## Running the example
1. Run the following inside `examples/file-associations/src-tauri`
```
cargo build --features tauri/protocol-asset
```
## Associations
This example creates associations with PNG, JPG, JPEG and GIF files.
Additionally, it defines two new extensions - `taurid` (derives from a raw data file) and `taurijson` (derives from JSON). They have special treatment on macOS (see `exportedType` in `src-tauri/tauri.conf.json`).