Skip to content
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

feat: Add ttl & password parameters in getSharingLink #1429

Merged
merged 2 commits into from
Dec 1, 2023

Conversation

Merkur39
Copy link
Member

BREAKING CHANGE: getSharingLink evolves, in order to offer more configuration options on the sharing link, two new parameters are added (ttl & password), and its API is now an object.

  • ttl(optional): Allows you to define a duration before the link expires (bigduration format, e.g. "4Y3M2D1h30m15s")
  • password(optional): New functionality, the generated link will return to a page requesting this password before accessing the shared resource.

Example:

getSharingLink({ client, filesIds, isFlatDomain, ttl, password })

@Merkur39 Merkur39 force-pushed the feat/Upgrade-getSharingLink branch from 3d18cac to 3f5ca50 Compare November 29, 2023 11:38
Copy link
Contributor

@paultranvan paultranvan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine by me, but it might be nice to deal with a default isFlatDomain at the same time, imo

@Merkur39
Copy link
Member Author

Fine by me, but it might be nice to deal with a default isFlatDomain at the same time, imo

I added a commit with this change!

@Merkur39 Merkur39 force-pushed the feat/Upgrade-getSharingLink branch 3 times, most recently from d37697d to 7e2eb8f Compare December 1, 2023 09:27
BREAKING CHANGE: The client already carries this information,
if need to change this value, please update the client.
`getSharingLink` evolves, in order to offer more
configuration options on the sharing link,
two new parameters in an options object are added.
- `ttl`(optional): Allows you to define a duration before the link
expires (bigduration format, e.g. "4Y3M2D1h30m15s")
- `password`(optional): New functionality,
the generated link will return to a page requesting
this password before accessing the shared resource.

Example:
```
getSharingLink(client, filesIds, { ttl, password })
```
@Merkur39 Merkur39 force-pushed the feat/Upgrade-getSharingLink branch from 7e2eb8f to 330b1ac Compare December 1, 2023 09:32
@Merkur39
Copy link
Member Author

Merkur39 commented Dec 1, 2023

Hey @paultranvan, after discussion with @Crash-- I reviewed the implementation.
I'll let you react and/or validate.

@Merkur39 Merkur39 requested a review from paultranvan December 1, 2023 09:34
@Merkur39 Merkur39 merged commit 1daa4d9 into master Dec 1, 2023
4 checks passed
@Merkur39 Merkur39 deleted the feat/Upgrade-getSharingLink branch December 1, 2023 11:18
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.

3 participants