A simple file transfer web app with support of P2P. Backend is written in Golang, frontend with React.
Features- P2P file transfer is implemented using simple-filer, a webRTC tool also written by me
😃 - upload progress is broadcast to all online users
- page and all its files are auto expired and deleted after specified duration
https://worksphere.cn/transfer/pdhwhwdwny84x1qvzig3xg0z
On this page, you can upload 4 files at most(each file 5M at most), send the page URL to your friends. You don't need to wait for the upload to finish, then send the URL. Your friends will see the upload progress as you do. Each page will expire after 20 minutes, after that, all files are removed, and the page URL is no longer valid.
This is a personal site with limited network bandwidth and storage, don't expect too much from the server performance. However, if you and your friends are both online at he same time, you can try the P2P transfer(Chrome browser only) which copy the file between your browsers without going through server. The number of files and file size you can transfer in P2P mode is only limited by your computer hard drive. But P2P connection is not guaranteed to work 100%.
Here is a running screenshot:

- Go(>= 1.9.2)
- MongoDB(>= 3.2)
- Chrome browser for P2P file transfer
- NodeJS(>=6.5) for client side JavaScript bundling
filetransferdweb/public
web-webRoot
command arguments(case matters)
serverPort9090mgoHost127.0.0.1:27017mgoUsernamemgoPasswordmgoDBNamefiletransfermgoCollectionNamefilesmaxUploadmaxFileSizemegabyte10m20MdurationurlRootPathtransferwebRootwebuploadDiruploadwebrtcConfig
Examples:
serverPort
webRootweb/public/var/www/webApp/transfer/
# in server block
location /transfer/public {
alias /var/www/webApp/transfer/web/public/;
}
location /transfer {
proxy_pass http://127.0.0.1:9090;
proxy_request_buffering off;
proxy_redirect off;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded_Proto $scheme;
}
maxUploadmaxFileSizego get
License
This project is licensed under the MIT License.