Skip to content

Commit 1311b61

Browse files
feat: Add Upload demo view
1 parent 80d4d8e commit 1311b61

File tree

8 files changed

+400
-11
lines changed

8 files changed

+400
-11
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/api/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"@tauri-apps/plugin-shell": "^2.3.0",
3030
"@tauri-apps/plugin-store": "^2.3.0",
3131
"@tauri-apps/plugin-updater": "^2.9.0",
32+
"@tauri-apps/plugin-upload": "^2.3.0",
3233
"@zerodevx/svelte-json-view": "1.0.11"
3334
},
3435
"devDependencies": {

examples/api/src-tauri/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ tauri-plugin-process = { path = "../../../plugins/process", version = "2.3.0" }
3838
tauri-plugin-opener = { path = "../../../plugins/opener", version = "2.4.0" }
3939
tauri-plugin-shell = { path = "../../../plugins/shell", version = "2.3.0" }
4040
tauri-plugin-store = { path = "../../../plugins/store", version = "2.3.0" }
41+
tauri-plugin-upload = { path = "../../../plugins/upload", version = "2.3.0" }
4142

4243
[dependencies.tauri]
4344
workspace = true

examples/api/src-tauri/capabilities/base.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@
9595
{
9696
"identifier": "opener:allow-open-path",
9797
"allow": [{ "path": "$APPDATA" }, { "path": "$APPDATA/**" }]
98-
}
98+
},
99+
"upload:default"
99100
]
100101
}

examples/api/src-tauri/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ pub fn run() {
3939
.plugin(tauri_plugin_opener::init())
4040
.plugin(tauri_plugin_shell::init())
4141
.plugin(tauri_plugin_store::Builder::default().build())
42+
.plugin(tauri_plugin_upload::init())
4243
.setup(move |app| {
4344
#[cfg(desktop)]
4445
{

examples/api/src/App.svelte

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import Opener from './views/Opener.svelte'
1717
import Store from './views/Store.svelte'
1818
import Updater from './views/Updater.svelte'
19+
import Upload from './views/Upload.svelte'
1920
import Clipboard from './views/Clipboard.svelte'
2021
import WebRTC from './views/WebRTC.svelte'
2122
import Scanner from './views/Scanner.svelte'
@@ -107,6 +108,11 @@
107108
component: Updater,
108109
icon: 'i-codicon-cloud-download'
109110
},
111+
{
112+
label: 'Upload',
113+
component: Upload,
114+
icon: 'i-codicon-cloud-upload'
115+
},
110116
{
111117
label: 'Clipboard',
112118
component: Clipboard,

0 commit comments

Comments
 (0)