mirror of
https://github.com/dutchcoders/transfer.sh.git
synced 2026-02-03 06:03:25 +00:00
Feature Request: environment variable for max storage size and duration. #194
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Leopere on GitHub.
Just would like a variable or two for the two settings in the title of this issue.
@paolafrancesca commented on GitHub:
@Leopere what do you mean by duration?
@Leopere commented on GitHub:
On Mon, Dec 28, 2020 at 5:37 AM Andrea Spacca notifications@github.com
wrote:
I’ve noticed.
Currently i just mount my instance’s volume to /tmp/. It would be good to
have the self purge be available but default and then maybe do what
Hastebin does and renew the lifespan after an access. Another thing is
there should potentially be a download limit by default to avoid this being
in worms or something malware like.
@Leopere commented on GitHub:
So the amount of time a file is stored and shared on the TransferSH instance before its purged.
@paolafrancesca commented on GitHub:
this is something advertised on the frontend but there is no such handling in the code.
I plan to add it as soon as I will have more time
max storage size would be the size allowed for single upload?
I could work on it
@paolafrancesca commented on GitHub:
this you can set with an header in the request.
there are also virustotal and clamd endpoints: https://github.com/dutchcoders/transfer.sh/blob/master/server/server.go#L422-L423
in general for private use I suggest to lock upload behind http auth credentials
I tested the second many times ago and it was working properly.
feel free to try both of them and report any bugs
the problem is that it should be implented for every storage.
since you are on local filesystem I suggest to use a cron with
findto achieve the same result for the momentthis will conflict wit the headers to control max download time and download lifetime
@Leopere commented on GitHub:
This unfortunately defeats the ease of use of this project I was kind of hoping to just kind of leave my instance public. If there was an option available to allow the Admin to set default expiry/purge that would be absolutely brilliant.
Thanks for this!
@Leopere commented on GitHub:
Thanks, I'll take a look.
On Mon, Jan 11, 2021 at 10:04 AM Andrea Spacca notifications@github.com
wrote:
@paolafrancesca commented on GitHub:
if you use
http-auth-userandhttp-auth-passparam the instance can still be public, but upload require http basic authI intend to implement the cleanup feature with expiring time for uploads, but it has to be implemented on every backend storage and it will take a little time
@Leopere commented on GitHub:
So far no console errors or anything when I added the variables to clear once a day any files older than 30. We'll see!
@paolafrancesca commented on GitHub:
@Leopere I addeded the upload purge feature
latest version (v1.2.1) has it working properly also for local storage