-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
purgeTime display #557
Comments
yes, I don't plan to change the resolution of purge days to other than (well ...) days :) the "human redeable" format of the period is https://github.com/dutchcoders/transfer.sh/blob/main/server/handlers.go#L377 |
Great, I will change it to print |
- changing the line `purgeTime = s.purgeDays.String()` to use a function that formats the days like this: "N days" or "1 day" - adding the function `formatDurationDays` in utils.go file Fixes dutchcoders#557
- changing the line `purgeTime = s.purgeDays.String()` to use a function that formats the days like this: "N days" or "1 day" - adding the function `formatDurationDays` in utils.go file Fixes #557 Co-authored-by: Andrea Spacca <andrea.spacca@gmail.com>
Currently the purge time is displayed with the format hours, minutes, seconds. For example, I want to store the files for 30 days, but in the web page shows "Files stored for 720h0m0s":
I have thought of two different approaches:
1. Display only the days without the hours and seconds:
2. Display the days, hours and seconds, omitting zero values:
I know that at the moment transfer.sh only supports days (an int value) for the purge time. If this is always going to be the case, perhaps it would be better to only show the days the files will be stored.
But, if there are plans or ideas to use another duration, such as minutes or seconds, in addition to days, the second approach would be better.
I'm willing to work on this, after deciding which approach to take.
The text was updated successfully, but these errors were encountered: