Feature Request: environment variable for max storage size and duration. #194

Closed
opened 2026-01-19 18:29:22 +00:00 by michael · 10 comments
Owner

Originally created by @Leopere on GitHub.

Just would like a variable or two for the two settings in the title of this issue.

Originally created by @Leopere on GitHub. Just would like a variable or two for the two settings in the title of this issue.
Author
Owner

@paolafrancesca commented on GitHub:

@Leopere what do you mean by duration?

@paolafrancesca commented on GitHub: @Leopere what do you mean by duration?
Author
Owner

@Leopere commented on GitHub:

On Mon, Dec 28, 2020 at 5:37 AM Andrea Spacca notifications@github.com
wrote:

So the amount of time a file is stored and shared on the TransferSH
instance before its purged.

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


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/dutchcoders/transfer.sh/issues/332#issuecomment-751667762,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAIE2VQCPUHW4HSCJSDMGVLSXBNWTANCNFSM4TWKQABA
.

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

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: On Mon, Dec 28, 2020 at 5:37 AM Andrea Spacca <notifications@github.com> wrote: > So the amount of time a file is stored and shared on the TransferSH > instance before its purged. > > 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 > > — > You are receiving this because you were mentioned. > Reply to this email directly, view it on GitHub > <https://github.com/dutchcoders/transfer.sh/issues/332#issuecomment-751667762>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AAIE2VQCPUHW4HSCJSDMGVLSXBNWTANCNFSM4TWKQABA> > . > ``` 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 ``` 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.
Author
Owner

@Leopere commented on GitHub:

So the amount of time a file is stored and shared on the TransferSH instance before its purged.

@Leopere commented on GitHub: So the amount of time a file is stored and shared on the TransferSH instance before its purged.
Author
Owner

@paolafrancesca commented on GitHub:

So the amount of time a file is stored and shared on the TransferSH instance before its purged.

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: >So the amount of time a file is stored and shared on the TransferSH instance before its purged. 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
Author
Owner

@paolafrancesca commented on GitHub:

Another thing is there should potentially be a download limit by default to avoid this being in worms or something malware like.

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

Currently i just mount my instance’s volume to /tmp/. It would be good to have the self purge be available but default

the problem is that it should be implented for every storage.
since you are on local filesystem I suggest to use a cron with find to achieve the same result for the moment

maybe do what Hastebin does and renew the lifespan after an access

this will conflict wit the headers to control max download time and download lifetime

@paolafrancesca commented on GitHub: > Another thing is there should potentially be a download limit by default to avoid this being in worms or something malware like. 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 > Currently i just mount my instance’s volume to /tmp/. It would be good to have the self purge be available but default the problem is that it should be implented for every storage. since you are on local filesystem I suggest to use a cron with `find` to achieve the same result for the moment > maybe do what Hastebin does and renew the lifespan after an access this will conflict wit the headers to control max download time and download lifetime
Author
Owner

@Leopere commented on GitHub:

in general for private use I suggest to lock upload behind http auth credentials

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.

since you are on local filesystem I suggest to use a cron with find to achieve the same result for the moment
I'm in no rush to have this fix I just have a scheduled container restart and it purges my instance from previous blobs automatically that way.

@aspacca aspacca mentioned this issue 25 minutes ago
ISSUE-332 #336
Merged
@aspacca aspacca closed this in #336 4 minutes ago

Thanks for this!

@Leopere commented on GitHub: > in general for private use I suggest to lock upload behind http auth credentials 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. > since you are on local filesystem I suggest to use a cron with find to achieve the same result for the moment I'm in no rush to have this fix I just have a scheduled container restart and it purges my instance from previous blobs automatically that way. > @aspacca aspacca mentioned this issue 25 minutes ago > ISSUE-332 #336 > Merged > @aspacca aspacca closed this in #336 4 minutes ago Thanks for this!
Author
Owner

@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:

@Leopere https://github.com/Leopere I addeded the upload purge feature
latest version (v1.2.1) has it working properly also for local storage


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/dutchcoders/transfer.sh/issues/332#issuecomment-758008533,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAIE2VTDEG6W3YG7OLJ7NNLSZMHQDANCNFSM4TWKQABA
.

@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: > @Leopere <https://github.com/Leopere> I addeded the upload purge feature > latest version (v1.2.1) has it working properly also for local storage > > — > You are receiving this because you were mentioned. > Reply to this email directly, view it on GitHub > <https://github.com/dutchcoders/transfer.sh/issues/332#issuecomment-758008533>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AAIE2VTDEG6W3YG7OLJ7NNLSZMHQDANCNFSM4TWKQABA> > . >
Author
Owner

@paolafrancesca 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.

if you use http-auth-user and http-auth-pass param the instance can still be public, but upload require http basic auth

I 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

@paolafrancesca 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. if you use `http-auth-user` and `http-auth-pass` param the instance can still be public, but upload require http basic auth I 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
Author
Owner

@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!

@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!
Author
Owner

@paolafrancesca commented on GitHub:

@Leopere I addeded the upload purge feature
latest version (v1.2.1) has it working properly also for local storage

@paolafrancesca commented on GitHub: @Leopere I addeded the upload purge feature latest version (v1.2.1) has it working properly also for local storage
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dutchcoders/transfer.sh#194