https://github.com/olback/tempfiles-rs
Upload a file and share it for 24 hours
https://github.com/olback/tempfiles-rs
Last synced: 9 months ago
JSON representation
Upload a file and share it for 24 hours
- Host: GitHub
- URL: https://github.com/olback/tempfiles-rs
- Owner: olback
- License: agpl-3.0
- Created: 2020-03-30T01:27:27.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-02-04T01:32:24.000Z (about 2 years ago)
- Last Synced: 2024-05-01T13:12:10.627Z (almost 2 years ago)
- Language: Rust
- Homepage: https://tempfiles.ninja
- Size: 376 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Tempfiles
**Share files for up to 24h hours.**
Everything you upload, including filename and content-type is encrypted with [`aes-gcm-siv`](https://en.wikipedia.org/wiki/AES-GCM-SIV).
**Table setup**
| column | data type | description |
| --------------- | -------------- |----------------------------------------------------------- |
| id | `VARCHAR(32)` | file id |
| iv | `bytea` | encryption iv (nonce) |
| content | `bytea` | encrypted file data |
| views | `integer` | valid file views |
| max_views | `integer/null` | delete after this amount of views, null if no limit is set |
| delete_password | `VARCHAR(32)` | password used for file deletion |
| timestamp | `timestamp` | used to determine if the file is older than 24h |
Inspired by [Carlgo11/TempFiles](https://github.com/carlgo11/TempFiles)
# Setup
## Backend
**Prerequisites**
* [Rust](https://www.rust-lang.org/) (cargo, rustup)
**Build:**
```terminal
cargo build --target x86_64-unknown-linux-gnu --release
```
## Frontend
**Prerequisites**
* NodeJS / NPM
**Build:**
```terminal
cd frontend
npm i --legacy-peer-deps
npm run build
```
## Deploy
* Copy `.sample.env` to `.env` and modify.
* Start services: `docker-compose up` (add `-d` to detach)
* To configure the database: `scripts/postgres_setup.sh`
* Done!