Download the file from the network

This commit is contained in:
Arnaud 2024-10-15 13:50:59 +02:00
parent fa54c23032
commit 2aeb2f005f
No known key found for this signature in database
GPG Key ID: 69D6CE281FCAE663

View File

@ -5,10 +5,9 @@ import { CodexSdk } from "../../sdk/codex";
export function Download() { export function Download() {
const [cid, setCid] = useState(""); const [cid, setCid] = useState("");
console.info(cid);
const onDownload = () => { const onDownload = () => {
const url = CodexSdk.url() + "/api/codex/v1/data/"; const url = CodexSdk.url() + "/api/codex/v1/data/";
window.open(url + cid, "_target"); window.open(url + cid + "/network", "_target");
}; };
const onCidChange = (e: ChangeEvent<HTMLInputElement>) => const onCidChange = (e: ChangeEvent<HTMLInputElement>) =>