Skip to content

Add --expires, --allow-download, --remove-expiration to share-link create#255

Merged
AndreyVMarkelov merged 1 commit into
masterfrom
share-link-create-expires
Jun 21, 2026
Merged

Add --expires, --allow-download, --remove-expiration to share-link create#255
AndreyVMarkelov merged 1 commit into
masterfrom
share-link-create-expires

Conversation

@AndreyVMarkelov

@AndreyVMarkelov AndreyVMarkelov commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add --expires flag to set expiration on created shared links (RFC3339 timestamp)
  • Add --allow-download flag to enable downloads on created shared links
  • Add --remove-expiration flag to remove expiration when returning an existing link
  • When the link already exists, flags are applied via ModifySharedLinkSettings
  • --expires and --remove-expiration are mutually exclusive

Test plan

  • --expires sets expiration on new link creation
  • --allow-download sets allow-download on new link creation
  • Invalid --expires value returns clear error before API call
  • --expires + --remove-expiration rejected as mutually exclusive
  • --remove-expiration is a no-op for freshly created links
  • --expires calls ModifySharedLinkSettings on existing links
  • --remove-expiration calls ModifySharedLinkSettings on existing links
  • --allow-download calls ModifySharedLinkSettings on existing links
  • Flags are registered on the command
  • golangci-lint clean, all tests pass

@AndreyVMarkelov AndreyVMarkelov merged commit 1bf05a7 into master Jun 21, 2026
7 checks passed
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