Using --purge-days with gdrive storage #13

Open
opened 2026-01-19 18:28:38 +00:00 by michael · 2 comments
Owner

Originally created by @Milz0 on GitHub.

Seems to have no effect with using purge-days and purge-interval while using gdrive as provider.
Files remain untouched since created date. Been 3 days.
Theres no instance of anything in logs either that it ran or failed, is this feature only for local storage?

nohup go run main.go --tls-listener 192.168.50.249:443 --purge-days 1 --purge-interval 1 --provider gdrive --basedir transfers --gdrive-client-json-filepath ./cred/oauth.json --gdrive-local-config-path ./cred/ --web-path ../transfer.sh-web/dist/ --force-https --tls-cert-file ../transfer.sh-web/cert.pem --tls-private-key ../transfer.sh-web/key.pem --log ./log.txt --max-upload-size 1048576

Originally created by @Milz0 on GitHub. Seems to have no effect with using purge-days and purge-interval while using gdrive as provider. Files remain untouched since created date. Been 3 days. Theres no instance of anything in logs either that it ran or failed, is this feature only for local storage? ```nohup go run main.go --tls-listener 192.168.50.249:443 --purge-days 1 --purge-interval 1 --provider gdrive --basedir transfers --gdrive-client-json-filepath ./cred/oauth.json --gdrive-local-config-path ./cred/ --web-path ../transfer.sh-web/dist/ --force-https --tls-cert-file ../transfer.sh-web/cert.pem --tls-private-key ../transfer.sh-web/key.pem --log ./log.txt --max-upload-size 1048576```
Author
Owner

@Milz0 commented on GitHub:

I think instead of looking at modifiedTime should it not be directed to createdTime as this timestamp shouldn't change on upload.

@Milz0 commented on GitHub: I think instead of looking at modifiedTime should it not be directed to createdTime as this timestamp shouldn't change on upload.
Author
Owner

@stefanbenten commented on GitHub:

The purge function has not been touched in about 3 years.
From looking at the code, it might be that the mode time gets updated every time someone access' the file and thus the "expiration" mechanism here will never work:
73b99b8bec/server/storage/gdrive.go (L256)

@stefanbenten commented on GitHub: The purge function has not been touched in about 3 years. From looking at the code, it might be that the mode time gets updated every time someone access' the file and thus the "expiration" mechanism here will never work: https://github.com/dutchcoders/transfer.sh/blob/73b99b8becabb6c9c16dbe894f6882df103d3f80/server/storage/gdrive.go#L256
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dutchcoders/transfer.sh#13