You're asking about creating a file transfer system (download/share) for large files (~30GB) using HTML, CSS, and JS, possibly with URLs containing #/".
Let's clarify the problem and what's feasible:
Understanding the Challenge
- Browser limitations: Browsers cannot handle direct upload/download of very large files (like 30GB) purely via frontend JS without backend support.
- File transfer mechanisms: Typically, large files are transferred via a server or P2P protocol (WebTorrent, WebRTC DataChannels, etc).
- "#/" in URL: The
# denotes a fragment identifier in URLs (client side routing or state). This is unrelated to file transfer itself but can be part of your app's URL scheme.
What you can do with plain HTML, CSS, JS (But limited):
- Select and share files locally (e.g., drag & drop or input file selection).
- Break a large file into chunks (using FileReader, Blob slice) and download chunks.
- Use IndexedDB for local storage.
- Use WebRTC DataChannels for P2P transfer between browsers (complex, requires signaling server).
But transferring a full 30GB large file between users via browser-only is impractical, because:
- Browser RAM & local storage limits.
- Upload bandwidth limits for clients (slow).
- No direct network socket for serverless file transfer.
Suggested Approach for 30GB File Sharing
- Backend Server with Chunked Uploads & Downloads
- User uploads file in chunks to server (Node.js, Go, Python backend).
- Other user downloads chunks from server.
- Server assembles chunks or streams file directly.
- Frontend can use
# for routing, showing progress/status.
- Use Existing 3rd-party Services
- Cloud storage providers (Google Drive, Dropbox, S3).
- Frontend links to shared files.
- P2P with WebRTC
- Use WebRTC DataChannels to transfer file chunks peer-to-peer. Requires signaling server (e.g., WebSocket).
- Implement chunked read, send, and reassemble on receiver side, with progress UI.
- Split Files Offline
- Split 30GB file into smaller parts offline (e.g., 1GB).
- Transfer in parts and reassemble.
Minimal Example: Chunk File Reader + Download Link (small files only)
<input type="file" id="filePicker" />
<button onclick="downloadPart()">Download Part</button>
<script>
let file;
document.getElementById('filePicker').addEventListener('change', e => {
file = e.target.files[0];
});
function downloadPart() {
if (!file) return alert('Select a file');
// read first 1MB slice as example
const slice = file.slice(0, 1024 * 1024);
const reader = new FileReader();
reader.onload = e => {
// Create blob URL to download
const blob = new Blob([e.target.result]);
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = file.name + '.part1';
document.body.appendChild(a);
a.click();
a.remove();
URL.revokeObjectURL(url);
};
reader.readAsArrayBuffer(slice);
}
</script>
For full 30GB file sharing, look into:
- Backend with chunked uploads/downloads + resumable upload (like tus.io protocol).
- WebTorrent (handles large file P2P streaming via BitTorrent in browser).
- WebRTC DataChannel file transfer solution (complex but powerful).
Summary
- Large file transfers cannot be done purely via frontend JS without backend or P2P signaling.
- Use backend or P2P infrastructures.
- Use chunking + resumable uploads.
- Use
# in URLs purely for client routing/state.
If you want, I can help you start a simple frontend UI for upload/download or a WebRTC P2P example. Just ask!