|
|
|
@ -3,7 +3,6 @@
|
|
|
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
|
|
|
|
|
|
import { invoke, Channel } from "@tauri-apps/api/core";
|
|
|
|
|
import { getCurrent } from "@tauri-apps/api/window";
|
|
|
|
|
|
|
|
|
|
interface ProgressPayload {
|
|
|
|
|
progress: number;
|
|
|
|
@ -16,7 +15,7 @@ async function upload(
|
|
|
|
|
url: string,
|
|
|
|
|
filePath: string,
|
|
|
|
|
progressHandler?: ProgressHandler,
|
|
|
|
|
headers?: Map<string, string>
|
|
|
|
|
headers?: Map<string, string>,
|
|
|
|
|
): Promise<void> {
|
|
|
|
|
const ids = new Uint32Array(1);
|
|
|
|
|
window.crypto.getRandomValues(ids);
|
|
|
|
@ -44,7 +43,7 @@ async function download(
|
|
|
|
|
url: string,
|
|
|
|
|
filePath: string,
|
|
|
|
|
progressHandler?: ProgressHandler,
|
|
|
|
|
headers?: Map<string, string>
|
|
|
|
|
headers?: Map<string, string>,
|
|
|
|
|
): Promise<void> {
|
|
|
|
|
const ids = new Uint32Array(1);
|
|
|
|
|
window.crypto.getRandomValues(ids);
|
|
|
|
|