Can I password protect files or folders programatically?
If not, would something like a random hash folder name and then random hash file name be an alternative, or is there a chance that a user then somehow still can access the files?
-
Hi there,
Thanks for contacting us.
We have three ways you can limit access to files:
-
Signed-URL authentication - Only for assets using the
authenticated
delivery type. - Token-based authentication (premium feature)
- Cookie-based authentication (premium feature)
Full docs here.
Best,
Tamara
0 -
Signed-URL authentication - Only for assets using the
-
Isn't the main point of a collection to enable different types of users with varying permissions the ability to access and interact with different file groupings? Allowing end users the ability to programatically distinguish between private and shareable data right when they upload via some kind of a preset without having to worry about generating an additional signature seems like a no brainer to me...
Right now I'm relying on a tag to distinguish between who can edit what because I don't need a backend and I also dont necessarily need to take advantage of lambdas either....
0 -
Hi Jacob,
The options mentioned above are about authenticating delivery requests for assets that were already marked as requiring authentication. It's possible in the upload API call or an upload preset to use those settings to control how an asset can be delivered later, and this is a long-standing feature of our classic Programmable Media product.
The relevant settings for delivery are exposed in the Media Library, and it's also possible to let your DAM users choose a preset before uploading a file: https://cloudinary.com/documentation/dam_upload_store_assets#media_library_upload_widget
Collections are a separate concept, and part of our DAM features: https://cloudinary.com/documentation/dam_folders_collections_sharing
There isn't currently programmatic access to access or modify Collections; they're managed via the Media Library UI and control how your account's Media Library users can interact with assets or share a complete collection externally.
An asset being in a Collection doesn't *directly* affect how it can be delivered publicly (which is related to the delivery type or access control options). it's possible for a public asset to be in a collection, or for assets in a collection to require authentication if accessed separately.If you have a specific use-case in mind and you're not sure how it can be achieved or which features you can use, please contact us directly via the "submit a request" form above with the details and we'll be happy to advise
Thanks,
Stephen
0
Post is closed for comments.
Comments
3 comments