[QUESTION] Can max-downloads and max-days used together? #175

Closed
opened 2026-01-19 18:29:18 +00:00 by michael · 1 comment
Owner

Originally created by @MayankFawkes on GitHub.

what if i send max-downloads and max-days together in one header will it work according?

Lets say i set max-download: 5 and max-days: 5

  • it means the file will get deleted after 5 days no matter if file gets downloaded 5 times or not
  • if it gets download 5 times in a single day then also it wil get deleted.
  • both

Thanks

Originally created by @MayankFawkes on GitHub. what if i send `max-downloads` and `max-days` together in one header will it work according? Lets say i set `max-download: 5` and `max-days: 5` * it means the file will get deleted after 5 days no matter if file gets downloaded 5 times or not * if it gets download 5 times in a single day then also it wil get deleted. * both Thanks
Author
Owner

@paolafrancesca commented on GitHub:

hi @MayankFawkes
first of all: the file won't be deleted according to that two values, only access to it will be denied (file purging is related to a setup value when starting the server)

as for your question: yes, they will work together (https://github.com/dutchcoders/transfer.sh/blob/master/server/handlers.go#L660-L663)

we check if max-downoad is reached, and return error/deny access if so
if not we check the max-days and do the same

@paolafrancesca commented on GitHub: hi @MayankFawkes first of all: the file won't be deleted according to that two values, only access to it will be denied (file purging is related to a setup value when starting the server) as for your question: yes, they will work together (https://github.com/dutchcoders/transfer.sh/blob/master/server/handlers.go#L660-L663) we check if `max-downoad` is reached, and return error/deny access if so if not we check the `max-days` and do the same
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dutchcoders/transfer.sh#175