Skip to content

Reinachan/filesharing

Repository files navigation

Filesharing Tool

Current state is beta. It has most of the functionality in place. You should expect bugs and breaking changes (requiring rebuilding the DB) until this leaves beta.

Features

  • Accounts with permission system
    • Upload files
    • List files
    • Delete files
    • Manage accounts
  • Upload files
    • Optional password lock
    • Optional expiery date
  • Works fine without JavaScript enabled, progressively enhanced with JS enabled
  • Files get uploaded in chunks (requires JavaScript)
    • Retries up to 5 times if errors occur
    • Current progress indicator

Project progress

You can view the current progress towards 1.0 full release here

Screenshots

Homepage Upload files page
download files page upload files page
Files list page Profile page (WIP)
files list page profile page

Build

In development

cargo run

Initialise database (this may change in the future)

cargo install sqlx
sqlx database create
sqlx migrate run

Compile typescript

npm i -g typescript # first time only
tsc --watch # compiles on save

Compile for production

tsc
cargo build --production # optimises performance

Run in production

./target/release/filesharing

Alternatively you can use Docker. To set that up, create a compose.yaml file in the parent directory of this project with this content:

version: '3.9'

services:
  filehost:
    container_name: fileshare
    build: ./Fileshare
    restart: unless-stopped
    env_file:
      - .env
    volumes:
      - ./Fileshare/files:/usr/src/fileshare/files
      - ./Fileshare/db:/usr/src/fileshare/db
      - ./Fileshare/assets:/usr/src/fileshare/assets
      - ./Fileshare/target/release:/usr/src/fileshare/release
    user: 1000:1000
    ports:
      - '3000:3000' # remove this if you're using Caddy/Nginx

Put the .env file next to the .compose.yaml file and run

# Prepare the binary
cd Fileshare
cargo build --release
tsc # assumes you've already installed typescript globally with npm
cd ..
# Build and run the docker container
docker compose build
docker compose up

License

The code is licensed under the AGPLv3 license. The icons in the assets folder are all public domain icons, some of which I've modified. All icons should be treated as being public domain.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published