This commit is contained in:
Mylloon 2022-10-26 15:56:02 +02:00
parent 40a92ce493
commit 0c12c6b2e6
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -69,6 +69,17 @@ const send = (file, element) => {
const req = new XMLHttpRequest();
req.open("POST", "upload");
req.send(data);
/* Here we need to store the public key and then wait for a response
* from the server. When the server send us a hash of the file
* salted (so 2 same file don't have a different URL) we redirect
* the user the a wait page so the uploader can copy a link like:
* Wait page: https://d/done
* Copy link: https://d/file/hash#pub_key_0:pub_key_1
* When the user click on the link, he can download the file, asking
* to the server with the hash of the link and the public key
* encoded in the URL */
});
});
};