Update README instructions and add screenshots
This commit is contained in:
101
README.md
101
README.md
@@ -1,18 +1,19 @@
|
|||||||
# File Drop Uploader
|
# File Drop Uploader
|
||||||
|
|
||||||
A tiny web app for collecting files and media and saving them to the local filesystem.
|
A self-hosted web app for uploading files and media and saving them to the filesystem on your server.
|
||||||
Admin users log in to create public invite links; invite links are always public-by-URL. A public uploader page is optional and enabled by default.
|
Useful for letting people upload vacation photos, etc. just by sending them a link.
|
||||||
|
|
||||||
Forked from "Immich Drop Uploader": https://github.com/Nasogaa/immich-drop
|
Admin user can create invite links with optional limits and password protection. A public uploader page is optional and enabled by default.
|
||||||
|
|
||||||

|
[View Screenshots](screenshots.md)
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- **Local Saving:** All uploaded files are saved to the local filesystem.
|
- **Local Saving:** All uploaded files are saved to the server's local filesystem.
|
||||||
- **Invite Links:** Create public-by-URL links for uploads; one-time or multi-use.
|
- **Drag and Drop:** Upload multiple files and folders by dragging them onto the page.
|
||||||
|
- **Invite Links:** Create sharable links for uploads; one-time or multi-use.
|
||||||
- **Manage Links:** Search/sort, enable/disable, delete, edit name/expiry.
|
- **Manage Links:** Search/sort, enable/disable, delete, edit name/expiry.
|
||||||
- **Passwords (optional):** Protect invites with a password gate.
|
- **Passwords (optional):** Protect invite links with a password.
|
||||||
- **Albums:** Upload into a specific folder (auto-create supported). Preserves client-side folder structure on upload.
|
- **Albums:** Upload into a specific folder (auto-create supported). Preserves client-side folder structure on upload.
|
||||||
- **Duplicate Prevention:** Local SHA‑1 cache prevents re-uploading the same file.
|
- **Duplicate Prevention:** Local SHA‑1 cache prevents re-uploading the same file.
|
||||||
- **Telegram Notifications (optional):** Get notified via Telegram when upload batches are complete.
|
- **Telegram Notifications (optional):** Get notified via Telegram when upload batches are complete.
|
||||||
@@ -26,7 +27,9 @@ Clone the repo.
|
|||||||
|
|
||||||
Copy `.env.example` to `.env` and edit.
|
Copy `.env.example` to `.env` and edit.
|
||||||
|
|
||||||
### docker-compose.yml
|
### Docker Compose
|
||||||
|
|
||||||
|
Create `docker-compose.yml` and edit:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
services:
|
services:
|
||||||
@@ -49,10 +52,15 @@ services:
|
|||||||
start_period: 10s
|
start_period: 10s
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Start the service:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ sudo docker compose up --build -d
|
$ sudo docker compose up --build -d
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Set up nginx / a reverse proxy and point it to the web app.
|
||||||
|
|
||||||
|
|
||||||
### Chunked Uploads
|
### Chunked Uploads
|
||||||
|
|
||||||
- Chunked uploads are enabled by default. Uses setting `CHUNKED_UPLOADS_ENABLED=true`.
|
- Chunked uploads are enabled by default. Uses setting `CHUNKED_UPLOADS_ENABLED=true`.
|
||||||
@@ -70,11 +78,22 @@ $ sudo docker compose up --build -d
|
|||||||
- WebSocket `/ws` pushes per‑item progress to the current browser session only.
|
- WebSocket `/ws` pushes per‑item progress to the current browser session only.
|
||||||
- **Persistence:** A local SQLite database (`state.db`) prevents re‑uploads across sessions. Uploaded files are stored in `/data/uploads`.
|
- **Persistence:** A local SQLite database (`state.db`) prevents re‑uploads across sessions. Uploaded files are stored in `/data/uploads`.
|
||||||
|
|
||||||
### Requirements
|
### Setup
|
||||||
|
|
||||||
- **Python** 3.11
|
Requires Python 3.11+.
|
||||||
|
|
||||||
### Local dev quickstart
|
Create a venv, activate it, and install:
|
||||||
|
|
||||||
|
```text
|
||||||
|
$ virtualenv -p python3 env
|
||||||
|
$ source env/bin/activate
|
||||||
|
(env) $ pip install -r requirements.txt
|
||||||
|
```
|
||||||
|
|
||||||
|
```text
|
||||||
|
(env) $ cp .env.example .env
|
||||||
|
(env) $ vim .env
|
||||||
|
```
|
||||||
|
|
||||||
Run with live reload:
|
Run with live reload:
|
||||||
|
|
||||||
@@ -82,54 +101,30 @@ Run with live reload:
|
|||||||
python main.py
|
python main.py
|
||||||
```
|
```
|
||||||
|
|
||||||
The backend contains docstrings so you can generate docs later if desired.
|
|
||||||
|
|
||||||
### Dev Configuration (.env)
|
|
||||||
|
|
||||||
```ini
|
|
||||||
# Server (dev only)
|
|
||||||
HOST=0.0.0.0
|
|
||||||
PORT=8080
|
|
||||||
|
|
||||||
# Public uploader page (optional) — disabled by default
|
|
||||||
PUBLIC_UPLOAD_PAGE_ENABLED=TRUE
|
|
||||||
|
|
||||||
# Local dedupe cache (SQLite)
|
|
||||||
STATE_DB=./data/state.db
|
|
||||||
|
|
||||||
# Telegram Bot for notifications (optional)
|
|
||||||
#TELEGRAM_BOT_API_KEY=
|
|
||||||
#TELEGRAM_BOT_OWNER_ID=
|
|
||||||
|
|
||||||
# Base URL for generating absolute invite links (recommended for production)
|
|
||||||
# e.g., PUBLIC_BASE_URL=https://photos.example.com
|
|
||||||
#PUBLIC_BASE_URL=
|
|
||||||
|
|
||||||
# Session and security
|
|
||||||
SESSION_SECRET=SET-A-STRONG-RANDOM-VALUE
|
|
||||||
LOG_LEVEL=DEBUG
|
|
||||||
|
|
||||||
# Chunked uploads (optional)
|
|
||||||
CHUNKED_UPLOADS_ENABLED=true
|
|
||||||
CHUNK_SIZE_MB=95
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
You can keep a checked‑in `/.env.example` with the keys above for onboarding.
|
|
||||||
|
|
||||||
### How it works
|
### How it works
|
||||||
|
|
||||||
1. **Queue** – Files selected in the browser are queued; each gets a client-side ID.
|
1. **Queue** - Files selected in the browser are queued; each gets a client-side ID.
|
||||||
2. **De-dupe (local)** – Server computes **SHA‑1** and checks `state.db`. If seen, marks as **duplicate**.
|
2. **De-dupe (local)** - Server computes **SHA‑1** and checks `state.db`. If seen, marks as **duplicate**.
|
||||||
3. **Save** – The file is saved to the local filesystem under `./data/uploads`.
|
3. **Save** - The file is saved to the local filesystem under `./data/uploads`.
|
||||||
4. **Album** – If an album is specified via an invite link, or a folder name is provided on the public page, the file is saved into a corresponding subdirectory. Client-side folder structure is also preserved.
|
4. **Album** - If an album is specified via an invite link, or a folder name is provided on the public page, the file is saved into a corresponding subdirectory. Client-side folder structure is also preserved.
|
||||||
5. **Progress** – Backend streams progress via WebSocket to the same session.
|
5. **Progress** - Backend streams progress via WebSocket to the same session.
|
||||||
6. **Privacy** – The UI shows only the current session's items. It does not provide a way to browse saved files.
|
6. **Privacy** - The UI shows only the current session's items. It does not provide a way to browse saved files.
|
||||||
|
|
||||||
### Security notes
|
### Security notes
|
||||||
|
|
||||||
- The menu and invite creation are behind login. Logout clears the session.
|
- The menu and invite creation are behind login. Logout clears the session.
|
||||||
- Invite links are public by URL; share only with intended recipients.
|
- Invite links are public by URL; share only with intended recipients.
|
||||||
- The default uploader page at `/` is disabled unless `PUBLIC_UPLOAD_PAGE_ENABLED=true`.
|
- The public uploader page at `/` is enabled unless disabled with `PUBLIC_UPLOAD_PAGE_ENABLED=false`.
|
||||||
- No browsing of uploaded media; only ephemeral session state is shown.
|
- No browsing of uploaded media; only ephemeral session state is shown.
|
||||||
- Run behind HTTPS with a reverse proxy and restrict CORS to your domain(s).
|
- Run behind HTTPS with a reverse proxy and restrict CORS to your domain(s).
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
This program is free and open-source software licensed under the MIT License. Please see the `LICENSE` file for details.
|
||||||
|
|
||||||
|
That means you have the right to study, change, and distribute the software and source code to anyone and for any purpose. You deserve these rights.
|
||||||
|
|
||||||
|
## Acknowledgements
|
||||||
|
|
||||||
|
This project was forked from "Immich Drop Uploader" by Simon Adams: https://github.com/Nasogaa/immich-drop
|
||||||
|
|
||||||
|
|||||||
BIN
media/admin-page.png
Normal file
BIN
media/admin-page.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 116 KiB |
BIN
media/after-uploading.png
Normal file
BIN
media/after-uploading.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 69 KiB |
BIN
media/invite-page.png
Normal file
BIN
media/invite-page.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 61 KiB |
BIN
media/public-uploader.png
Normal file
BIN
media/public-uploader.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 29 KiB |
BIN
media/telegram-bot.png
Normal file
BIN
media/telegram-bot.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 63 KiB |
BIN
screenshot.png
BIN
screenshot.png
Binary file not shown.
|
Before Width: | Height: | Size: 160 KiB |
21
screenshots.md
Normal file
21
screenshots.md
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
# Screenshots
|
||||||
|
|
||||||
|
## Public upload page
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## After uploading files
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Admin page
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Invite link (with password)
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Telegram bot
|
||||||
|
|
||||||
|

|
||||||
Reference in New Issue
Block a user