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

MLIBZ-2446: Add support for kinveyfile_ttl and kinveyfile_tls query parameter for Datastore GET requests #289

Merged
merged 5 commits into from
May 4, 2018

Conversation

thomasconner
Copy link
Contributor

Description

Files can be referenced in entities stored on a datastore collection. For more information please read Files REST Guide. These file references are resolved when a GET request is made. The GET request can optionally set kinveyfile_ttl and/or kinveyfile_tls to change the _downloadUrl from http to https and limit how long the _downloadUrl is valid.

Changes

  • Add support for kinveyfile_ttl and kinveyfile_tls query parameter GET requests made with the NetworkRepository
  • Add unit tests to networkstore.spec.js, cachestore.spec.js, and sync.spec.js that check kinveyfile_ttl and kinveyfile_tls query parameters are properly set for GET requests.

@thomasconner thomasconner self-assigned this May 1, 2018
@thomasconner thomasconner requested a review from heyzooi May 1, 2018 17:41
Copy link
Contributor

@heyzooi heyzooi left a comment

Choose a reason for hiding this comment

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

@thomasconner what's the difference between kinveyfile_ttl and _expiresAt and ttl_in_seconds? also the difference between tls and kinveyfile_tls? the docs does not make it clear

@thomasconner
Copy link
Contributor Author

kinveyfile_ttl is used when you are loading an entity that has a file reference with a data store. _expiresAt is the value returned by the server that informs the user when the _downloadUrl is to expire. ttl_in_seconds is the query parameter used when downloading files using the Kinvey.Files API.

tls is the query parameter used when downloading files using the Kinvey.Files API. kinveyfile_tls is used when you are loading an entity that has a file reference with a data store.

Hopefully that makes sense. 😄

Copy link
Contributor

@heyzooi heyzooi left a comment

Choose a reason for hiding this comment

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

LGTM!

@thomasconner thomasconner merged commit 20565e8 into master May 4, 2018
@thomasconner thomasconner deleted the MLIBZ-2446_files_bug branch May 4, 2018 11:34
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.

2 participants