Home
Softono
dfile

dfile

Open source SCSS
81
Stars
1
Forks
5
Issues
2
Watchers
5 years
Last Commit

About dfile

DFile is a no-nonsense, S3-based file sharing platform built with Python and Flask, designed for secure and efficient file hosting. It serves as a lightweight alternative to complex file management systems, leveraging Amazon S3 or compatible object storage services to store and retrieve files globally. The system consists of a backend API for handling uploads and downloads, and a frontend interface for user interaction. Key features include support for direct file uploads via cURL or web interface, generation of short and shareable download URLs, and a modern, responsive user interface built with React and Reactstrap. The platform is configured to use external object storage, requiring users to set S3 credentials such as region, endpoint, access key, and secret key. It also maintains upload and download logs in a PostgreSQL database for tracking and analytics. DFile supports easy deployment through virtual environments and standard Python package management, with frontend builds handled via Yarn. It has evolv

Platforms

Web Self-hosted Docker

Languages

SCSS

[Python] DFile: A fancy S3-based file sharing mode

Codacy Badge

This is a no-bullshit and S3-based file hosting that also runs on https://dfile.app

img

DFile backend (api)

Before running the service for the first time, run

cp config.sample config.py

Modify config.py (mainly setup your S3)

DOMAIN = "http://localhost:5000"
S3_REGION = "<s3 region>"
S3_ENDPOINT = "https://s3-domain.com"
S3_KEY = "<your s3 key>"
S3_SECRET = "<your s3 secret>"

Run it

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/

# run
cd app
yarn
yarn dev

# export to production
yarn export

How to use

# 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