ZizzyDizzyMC / linx-server

Self-hosted file/code/media sharing website. ~~~~~~~~~~~~~~~~~~~ Powers https://put.icu
GNU General Public License v3.0
211 stars 34 forks source link

Get notified of a new upload #17

Open luckman212 opened 2 years ago

luckman212 commented 2 years ago

I use Pushover for notifications.

Anyone know if it would be possible or can point me in the right direction of where to add an HTTP POST to the Pushover API upon successful upload?

Somewhere in upload.go right before this line maybe? https://github.com/ZizzyDizzyMC/linx-server/blob/a327bb8dbe55bbdd0ef5e2b6178d9296bf476937/upload.go#L120

tuxx commented 1 month ago

I made some very limited pushover support when a file gets uploaded.

Things that could be improved:

Anyway, hope this helps, i thought it was a good idea so i implemented it :+1: .

Especially like this feature since my instance lately has been spammed with virus .zip's and weird files from all over the world and i would like to keep it open.

To use this feature: 1) Create an application in pushover, copy the user key and api token 2) add the CLI parameters -pushover-key and -pushover-token when running linx-server.