Add image/attachment support in preview mode
- Fetch attachments via WebDAV using Tauri HTTP plugin (bypasses CORS) - Parse markdown for image references and convert to base64 data URLs - In-memory cache to avoid re-fetching images - Loading indicator while images load - Register tauri-plugin-http in Rust builder - Add HTTP permissions in capabilities
This commit is contained in:
@@ -23,4 +23,5 @@ tauri-plugin-opener = "2"
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
serde_json = "1"
|
||||
tauri-plugin-dialog = "2.6.0"
|
||||
tauri-plugin-http = "2.5.7"
|
||||
|
||||
|
||||
@@ -5,6 +5,14 @@
|
||||
"windows": ["main"],
|
||||
"permissions": [
|
||||
"core:default",
|
||||
"opener:default"
|
||||
"opener:default",
|
||||
"http:default",
|
||||
{
|
||||
"identifier": "http:default",
|
||||
"allow": [
|
||||
{ "url": "https://*" },
|
||||
{ "url": "http://*" }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ pub fn run() {
|
||||
tauri::Builder::default()
|
||||
.plugin(tauri_plugin_opener::init())
|
||||
.plugin(tauri_plugin_dialog::init())
|
||||
.plugin(tauri_plugin_http::init())
|
||||
.invoke_handler(tauri::generate_handler![greet])
|
||||
.run(tauri::generate_context!())
|
||||
.expect("error while running tauri application");
|
||||
|
||||
Reference in New Issue
Block a user