Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lytexdev/fileupload
🔗 File Upload: Secure file sharing 🔗
https://github.com/lytexdev/fileupload
file-sharing file-upload flask python self-hosted server
Last synced: 28 days ago
JSON representation
🔗 File Upload: Secure file sharing 🔗
- Host: GitHub
- URL: https://github.com/lytexdev/fileupload
- Owner: lytexdev
- License: mit
- Created: 2024-09-19T17:11:02.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-11-23T14:41:17.000Z (about 1 month ago)
- Last Synced: 2024-11-23T15:29:42.969Z (about 1 month ago)
- Topics: file-sharing, file-upload, flask, python, self-hosted, server
- Language: Python
- Homepage:
- Size: 37.1 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# File Upload
## Overview
A flask web application for securely uploading files with user authentication and password-protected downloads.## Features
- **User Authentication:** Only registered users can upload files
- **Password-Protected Downloads:** Users can download files with a password
- **File Management:** View a list of all uploaded files (only accessible to logged-in users)
- **Zero JavaScript:** This application is built without any Javascript## Installation
### Prerequisites
- docker-compose**Clone the repository**
```bash
git clone https://github.com/lytexdev/FileUpload.git
cd FileUpload
```**Copy and rename `.env.example` to `.env`**
```bash
cp .env.example .env
```**Insert a Flask secret key in `.env`**
```bash
FLASK_SECRET_KEY=your-secret-key
```**Build and run the Docker image**
```bash
# with docker-compose-v2
docker compose up -d# with docker-compose-v1
docker-compose up -d
```
By default it runs on port 8080## Usage
### User Management
#### Create a new user:
```bash
docker exec -it fileupload-web-1 sh -c "python3 user.py create"
```
#### Delete a user:
```bash
docker exec -it fileupload-web-1 sh -c "python3 user.py delete"
```### File Upload
- Upload a file: navigate to `http://localhost:8080/upload` and select a file to upload
### File Management
- View a list of all uploaded files: navigate to `http://localhost:8080/files`
### Password-Protected Downloads
- Download a file: navigate to `http://localhost:8080/file/`
## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.