https://github.com/coolcode/dfile
[Python + Flask] DFile: A fancy S3-based file sharing mode
https://github.com/coolcode/dfile
blockchain dapp decentralized dfile docker file-sharing file-upload flask free ipfs nginx node nodejs python reactjs yarn
Last synced: about 1 month ago
JSON representation
[Python + Flask] DFile: A fancy S3-based file sharing mode
- Host: GitHub
- URL: https://github.com/coolcode/dfile
- Owner: coolcode
- Created: 2019-08-15T18:01:51.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-05-06T20:09:28.000Z (about 4 years ago)
- Last Synced: 2025-04-11T04:06:13.914Z (about 1 month ago)
- Topics: blockchain, dapp, decentralized, dfile, docker, file-sharing, file-upload, flask, free, ipfs, nginx, node, nodejs, python, reactjs, yarn
- Language: SCSS
- Homepage: https://dfile.app
- Size: 25.9 MB
- Stars: 82
- Watchers: 3
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# [Python] DFile: A fancy S3-based file sharing mode
[](https://www.codacy.com/manual/coolcode/dfile?utm_source=github.com&utm_medium=referral&utm_content=coolcode/dfile&utm_campaign=Badge_Grade)
This is a no-bullshit and S3-based file hosting that also runs on [https://dfile.app](https://dfile.app)

## DFile backend (api)
Before running the service for the first time, run
```bash
cp config.sample config.py
```Modify config.py (mainly setup your [S3](https://aws.amazon.com/s3/))
```bash
DOMAIN = "http://localhost:5000"
S3_REGION = ""
S3_ENDPOINT = "https://s3-domain.com"
S3_KEY = ""
S3_SECRET = ""
```Run it
```bash
python3 -m venv venv
source ./venv/bin/activate
pip install -r requirements.txt
export FLASK_APP=app
export FLASK_ENV=development
export FLASK_DEBUG=1
flask run --host 0.0.0.0 --port 5000
```## DFile frontend (app)
Install yarn first: [https://yarnpkg.com/lang/en/docs/install/](https://yarnpkg.com/lang/en/docs/install/)
```bash
# run
cd app
yarn
yarn dev# export to production
yarn export
```## How to use
```bash
# Upload using cURL
➜ curl -F [email protected] https://dfile.herokuapp.com
https://dfile.app/d/F5r3yiDM.png# Download the file
➜ curl -L https://dfile.app/d/F5r3yiDM.png -o xxx.png
```## Release History
- 2020/05/20: https://github.com/coolcode/dfile/tree/v0.20.0520
- UI theme changed from Semantic React to Reactstrap (aka. React Bootstrap)
- nextjs upgraded to 9.4.2
- reactjs upgraded to 16.13.1- 2020/05/16: https://github.com/coolcode/dfile/tree/v0.20.0516
- File server changed from DigitalOcean to AWS S3
- API server changed from Singapore to USA (us-west-2)
- Saved uploads and downloads to Postgresql (us-west-2)
- API changed to https://dfile.herokuapp.com
- Shorten file url, easy to share file. https://dfile.app/d/F5r3yiDM.png
- Breaking changes, old files in Singapore server would be removed.- 2019/10/21: https://github.com/coolcode/dfile/tree/v0.19.1021
- S3-based file sharing mode
- Deployed to DigitalOcean
- All servers were in Singapore
- 2019/10/03: https://github.com/coolcode/dfile/tree/v0.19.1003
- IPFS-based file sharing mode
- Deployed to DigitalOcean
- All servers were in Singapore