/upload

Files upload service in Golang.

Primary LanguageGoGNU General Public License v3.0GPL-3.0

upload

upload - files upload service in golang.

last-version-blue

screenshot from 2014-08-31 12 02 23

Useful if you want to send big files to others and common mail servers don't accept files over a standard length (usually a few MB).

  • Using
    • Compile. See here how.
    • Copy upload folder in your account on your Ubuntu machine.
    • Run ./upload file from upload folder.
    • Open http://localhost:8080 in browser. Replace localhost with server ip if you access upload service from another computer. If you are behind a router remember to forward 8080 port. Change this port as needed.
    • Use user and password from secrets file. Change this file as needed.
    • Upload a file and send received link to others for download.

Files are transfered in /files folder.

Automaticaly start service by adding in /etc/rc.local

 sudo nano /etc/rc.local

and add following line before exit

 /home/user/cws/upload/upload &

Use cron to keep server clean

 crontab -e

and add following line to clean files older than 24h

MAILTO=""
* * * * * find /home/george/src/github.com/geosoft1/upload/files/* -mtime +1 -exec rm {} \;

Clear MAILTO to avoid sending mails to root if no files to delete. Feel free to use any location.

No root rights are required.