A simple light-weight file upload tool
Go to file
Blake Rain b4f68d91cd
All checks were successful
Check / check (push) Successful in 3m1s
Deploy / build (push) Successful in 2m16s
fix: some issues where buttons were assuming they're in a table
2024-08-15 17:03:58 +01:00
.gitea/workflows fix: switch to upload-artifacts v3 (due to MD5 missing) 2024-08-15 15:18:31 +01:00
cypress fix: incorrect child index in test 2024-08-15 15:48:54 +01:00
media chore: update screenshot used in README 2024-08-12 15:46:00 +01:00
migrations feat: add functionality to define custom slugs 2024-08-14 22:44:49 +01:00
scripts feat: add a share link modal (closes #7) 2024-08-15 16:54:28 +01:00
src fix: some issues where buttons were assuming they're in a table 2024-08-15 17:03:58 +01:00
static chore: commit of current WIP 2023-10-16 11:30:27 +01:00
style fix: swap uploads table to a CSS grid 2024-08-15 13:37:48 +01:00
templates fix: some issues where buttons were assuming they're in a table 2024-08-15 17:03:58 +01:00
.gitignore fix: run Cypress with same database 2024-08-15 14:17:08 +01:00
.ignore chore: start of Cypress tests 2024-08-15 10:22:58 +01:00
build.rs fix: order of build operations (npm install _before_ trying to copy) 2024-08-08 18:29:07 +01:00
Cargo.toml feat: added MFA support (closes #5) 2024-08-10 14:37:56 +01:00
cypress.config.ts chore: turn on logging and consolidate tasks 2024-08-15 15:27:46 +01:00
Dockerfile fix: issue with node version, perhaps. 2024-08-13 18:06:19 +01:00
esbuild-bundle.json feat: switch over to minijinja and other updates 2024-08-06 13:15:54 +01:00
LICENSE Initial commit 2023-10-14 10:36:18 +00:00
package.json chore: start of Cypress tests 2024-08-15 10:22:58 +01:00
postcss.config.js chore: break up styles and remove unnecessary classes 2024-08-06 16:44:38 +01:00
README.md chore: add note that Parcel uses Preact and web components 2024-08-10 10:23:46 +01:00
tailwind.config.js chore: changeover to TypeScript because I'm old 2024-08-08 08:51:02 +01:00
tsconfig.json feat: added MFA support (closes #5) 2024-08-10 14:37:56 +01:00

parcel A simple file upload tool

Screenshot of Parcel after a successful upload

Parcel is a simple light-weight file upload application with a nice UI and a small set of features.

  • Support multiple users and administrators
  • Uploaded files can be made public to allow download from anywhere
  • Number of downloads can be limited, and downloads can have an expiry date
  • Files are stored in separate cache directory
  • Data is stored in an SQLite database
  • Written in Rust using the Poem web framework
  • Styled using Tailwind CSS
  • Using Preact and Web Components

Running Parcel

The easiest way to run Parcel is with Docker, using the blakerain/parcel image on Dockerhub:

docker run blakerain/parcel

Parcel can be controlled through arguments or environment variables. The environment variables are a useful way to control Parcel when creating a Docker container.

Environment Name Default Description
DB sqlite://parcel.db SQLite connection string
CACHE_DIR ./cache Directory for file cache
COOKIE_SECRET Secret used for session cookie encryption
ANALYTICS_DOMAIN Domain to use for analytics script
PLAUSIBLE_SCRIPT URL for Plausible Analytics script

For example, if you had created a volume parcel_data and mounted it under /data you could tell Parcel to store the DB and file cache in that location by setting the DB environment variable to sqlite:///data/parcel.db and CACHE_DIR to /data/cache.

If you do not set the COOKIE_SECRET, you will end up being logged out every time that the container starts. To mitigate this, pass a value for COOKIE_SECRET when starting the container.

docker run -d \
  --name my-parcel \
  -e DB=sqlite:///data/parcel.db \
  -e CACHE_DIR=/data/cache \
  -e COOKIE_SECRET=$(openssl rand -base64 32 | tr -d '\n' ; echo) \
  -e ANALYTICS_DOMAIN=parcel.example.com \
  -e PLAUSIBLE_SCRIPT=https://pa.example.com/js/script.js \
  -v parcel_data:/data

Development

When running as a development server, cargo watch is mighty helpful. You may also wish to set up a cookie key (in the COOKIE_SECRET environment variable) to avoid being signed out after a restart:

# Initial setup of a cookie key
COOKIE_SECRET=$(openssl rand -base64 32 | tr -d '\n' ; echo)
export COOKIE_SECRET

# Run the server, but recompile/restart on any changes
cargo watch -L debug -x run

Please Note: The icon used for this application is the package-open icon from the Lucide icon pack.