cloudinary / cloudinary-cli

A command line interface for Cloudinary's APIs
https://cloudinary.com/documentation/cloudinary_cli
MIT License
17 stars 10 forks source link

Generate Signed URLs for assets with Access Mode: Authenticated #62

Closed aleksandar-cloudinary closed 1 year ago

aleksandar-cloudinary commented 1 year ago

Brief Summary of Changes

Currently, for download_files, we only sign URLs if the type is private/authenticated but any assets already uploaded with access_mode: authenticated can't be downloaded without a valid signed URL. Adding change to also sign if the asset in question has access mode set. Otherwise, Sync Pull actions will fail for such assets.

Via the CLI, Access Mode isn't supported to be set (such as via the upload() method of Upload API) nor does it contain update_access_mode_* methods as part of the Admin API though for Sync purposes I think it makes sense to be able to download previously uploaded assets with access_mode.

What does this PR address?

Are tests included?

Reviewer, please note:

Checklist: