A simple go program that reads files from a json and hosts them under a link
This can be used as a systemd service. Data.json has to be in the same directory and contains the port and the files to be hosted. The directory has now been set to "/opt/fileshare/" (you can change this in the json interface code)
"example": "/path/to/file" will host the file under http://localhost:port/example
this link will just lead directly to the file so any device can easily download your files.
Note: This is a fun project and my first go project so it may be a bit rough. But it works and it will get better over time... I hope
Displays all shared files along with their assigned subpaths.
Creates a new share for the specified file under the given subpath.
subpath= desired share namefile= path to the file on the systemuse-expiration= max usestime-expiration= time limit
addrandom, random, add_random, addr -file=<file> [-use-expiration=<num>] [-time-expiration=<xxh/d/w/m/y>]
Creates a new share for the specified file with a randomly generated subpath.
file= path to the file on the systemuse-expiration= max usestime-expiration= time limit
Removes an existing share.
subpath= existing share name
Changes the subpath of an existing share.
old_subpath= current share namenew_subpath= new share name