CarrierWave is a gem that provides a simple and extremely flexible way to upload files from Ruby Applications.
When uploading assets to Cloudinary, both the original asset and its transformed versions are publicly available through a CDN. One way to restrict access to your assets is based on the asset's storage type.
Cloudinary supports three different storage types:
- upload - The asset is publicly available.(Default)
- private - Original assets are only accessible by a signed URL.
- authenticated - Original assets and derivations are only accessible through signed URLs.
In Rails, when you upload a photo with carrierwave, you can add the following in the code to set the storage type appropriately:
- self.storage_type= :private (for private storage type)
- self.storage_type= :authenticated (for authenticated storage type)
Comments
0 comments
Please sign in to leave a comment.