Skip to content

Add download limit feature to shares and update related UI components#206

Open
Thnorty wants to merge 1 commit intoErugoOSS:mainfrom
Thnorty:feature/download-limits
Open

Add download limit feature to shares and update related UI components#206
Thnorty wants to merge 1 commit intoErugoOSS:mainfrom
Thnorty:feature/download-limits

Conversation

@Thnorty
Copy link
Copy Markdown

@Thnorty Thnorty commented Mar 14, 2026

This PR introduces the missing functionality to set a maximum download limit when creating file shares, making it work seamlessly alongside the existing time based expiration feature.

Changes:

  • Uploader UI: Added a numeric input to the share creation panel allowing users to set a specific download limit (defaults to "Unlimited").
  • Downloader UI: Added a live tracker below the expiration timer showing remaining downloads (e.g., "Downloaded 1 of 3 times").
  • Enforcement: SharesController.php now blocks access and automatically sets the share's expires_at to Carbon::now() the moment the limit is hit.
  • Cleanup: By forcing the expiration date, this feature natively hooks into the existing cleanExpiredShares job to physically delete the files without needing new cleanup logic.
  • Translations: Added localization strings across 6 languages for the new UI elements.

Testing:
Create a share with a set download limit. Download it until the limit is exhausted; the share should immediately invalidate and reflect as expired.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant