upfi

command module
v0.0.0-...-0daaea0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 15, 2022 License: GPL-3.0 Imports: 5 Imported by: 0

README

upfi: file management server

Go Report Card

Goal

The goal of the project is to create an easy to setup file hosting service. The idea is that anyone with a linux computer can setup a upfi-instance!

Setup

You will need to create a database and configure an environment variables file. Here is a example of the .env file. All of the fields below must be added to the .env for the service to work.

#.env
db_name=upfi
db_port=5432
db_host=localhost
port=8080
db_user=postgres
root_dir=/home/username/go/src/github.com/nireo/upfi/

The root dir is there since I found some problems with relative file paths. Such that the project uses a util function which appends the 'root_dir' variable to all of the paths.

To use a different database than postgres, check out the documentation of gorm.

Now you can just run the app.

go run main.go

TODO

  • Make the service more secure and follow security best practices.
  • Do some input validation to make sure user's don't post too long inputs.
  • Add a success page to remove the bug with redirecting.
  • Make the encryption key map to a single file rather than being global for the user.
  • Make it optional to encrypt a file such that the user can possibly share it.

Contributions

Anyone can contribute to the project by creating a pull request!

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL