Rouji / single_php_filehost

Simple Filehosting Page in a Single PHP File (obvious 0x0 clone)
ISC License
235 stars 35 forks source link

Option to also use hours (h) instead of just days on MAX_FILEAGE and MIN_FILEAGE #24

Closed TehPeGaSuS closed 1 month ago

TehPeGaSuS commented 10 months ago

Hello,

First of all I'd like to thank for the amazing work. Been using it for more than one year already, with no issues.

Recently, on IRCv3 a spec named filehost was discussed and a draft proposal was done here.

To avoid some abuses it would be nice if we can also specify hours instead of just days, because most of the time the file shared is bits of code that will be viewed right away, like a compilation error, a bug report, some POC code, etc.

This way we could keep our server clean of files that don't need to be accessed for more than a couple of hours.

Rouji commented 10 months ago

Hi!

What do you mean by abuse, exactly? Compilation errors etc. are neither spam nor illegal nor big enough to be a problem if they're around for a day or even longer.

And you don't really get around having to deal with moderating actual abusive content unless you go like <1h retention.

I personally have good reason for running x0.at with a big MIN time, but I guess having more granular control would be nice. (Weeks are just a multiple of days, so not that useful, but units smaller than days would be)

Rouji commented 10 months ago

I'll also add that with retention times that small, the whole file-size based maths feels kind of useless and you could just simply do a find /files -mmin +59 -delete or something

TehPeGaSuS commented 10 months ago

What do you mean by abuse, exactly? Compilation errors etc. are neither spam nor illegal nor big enough to be a problem if they're around for a day or even longer.

By abuse I mean people that will use automated processes to send the same file over and over again (yes, I know spammers that will do that eventually) therefore filling up your disk space (I only have 100 GB).

Rouji commented 10 months ago

Yeah you have to deal with that no matter what, really