2024-06-14 14:57:55 +00:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>Transfer.coffee</title>
|
2024-06-14 15:53:35 +00:00
|
|
|
<link rel="stylesheet" href="/css/style.css" />
|
2024-06-14 15:58:08 +00:00
|
|
|
<script src="/js/webtorrent.min.js"></script>
|
2024-06-14 14:57:55 +00:00
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div class="container">
|
|
|
|
<h1>Transfer.coffee</h1>
|
2024-06-15 12:49:50 +00:00
|
|
|
<div class="section" id="intro">
|
|
|
|
<p>
|
|
|
|
Transfer.coffee is a simple way to share files between devices. Just
|
|
|
|
select a file and share the generated URL with the recipient. The
|
|
|
|
recipient can then download the file by entering the mnemonic.
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
The files are shared using WebTorrent, a peer-to-peer file sharing
|
|
|
|
protocol. This means that the file is not stored on a central server
|
|
|
|
and is instead shared directly between the sender and the recipient.
|
|
|
|
</p>
|
|
|
|
</div>
|
2024-06-15 07:27:23 +00:00
|
|
|
<div class="section" id="uploadSection">
|
2024-06-14 15:34:36 +00:00
|
|
|
<h2>Share File</h2>
|
2024-06-14 14:57:55 +00:00
|
|
|
<input type="file" id="fileInput" />
|
2024-06-15 12:53:51 +00:00
|
|
|
<button id="uploadButton" onclick="uploadFile()">Share</button>
|
2024-06-14 14:57:55 +00:00
|
|
|
<div class="result" id="uploadResult"></div>
|
2024-06-15 07:27:23 +00:00
|
|
|
<div class="result" id="uploadStats"></div>
|
2024-06-15 12:49:50 +00:00
|
|
|
<button
|
|
|
|
id="copyButton"
|
|
|
|
style="display: none"
|
|
|
|
onclick="copyToClipboard()"
|
|
|
|
>
|
|
|
|
Copy URL
|
|
|
|
</button>
|
2024-06-14 14:57:55 +00:00
|
|
|
</div>
|
2024-06-15 07:27:23 +00:00
|
|
|
<div class="section" id="downloadSection">
|
2024-06-14 16:32:51 +00:00
|
|
|
<h2>Receive File</h2>
|
2024-06-14 14:57:55 +00:00
|
|
|
<input type="text" id="mnemonicInput" placeholder="Enter mnemonic" />
|
2024-06-15 12:41:39 +00:00
|
|
|
<button id="downloadButton" onclick="downloadFile()">Receive</button>
|
2024-06-14 14:57:55 +00:00
|
|
|
<div class="progress" id="downloadProgress">
|
|
|
|
<div class="progress-bar" id="downloadProgressBar">0%</div>
|
|
|
|
</div>
|
|
|
|
<div class="result" id="downloadResult"></div>
|
2024-06-15 12:41:39 +00:00
|
|
|
<div class="result" id="downloadStats"></div>
|
2024-06-15 12:49:50 +00:00
|
|
|
</div>
|
|
|
|
<div class="section" id="footer">
|
|
|
|
<h2>About</h2>
|
|
|
|
<p>
|
|
|
|
All files are transferred using WebTorrent. This means that the file
|
|
|
|
is not stored on a central server and is instead shared directly
|
|
|
|
between the sender and the recipient. Note that this means that the IP
|
|
|
|
addresses of the sender and recipient may be exposed to each other.
|
|
|
|
Files are only available for download as long as someone is seeding
|
|
|
|
them, i.e. as long as someone with a full copy of the file keeps the
|
|
|
|
page open.
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
Transfer.coffee is open source. You can view the source code on
|
|
|
|
<a href="https://git.private.coffee/PrivateCoffee/transfer.coffee">
|
|
|
|
Private.coffee Git</a
|
|
|
|
>.
|
|
|
|
</p>
|
2024-06-14 14:57:55 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2024-06-15 07:27:23 +00:00
|
|
|
<script>
|
|
|
|
const trackerUrl = "<%= trackerUrl %>";
|
2024-06-15 12:41:39 +00:00
|
|
|
<% if (typeof mnemonic !== 'undefined') { %>
|
|
|
|
const mnemonic = "<%= mnemonic %>";
|
|
|
|
<% } %>
|
2024-06-15 07:27:23 +00:00
|
|
|
</script>
|
2024-06-14 15:53:35 +00:00
|
|
|
<script src="/js/index.js"></script>
|
2024-06-14 14:57:55 +00:00
|
|
|
</body>
|
|
|
|
</html>
|