简体   繁体   中英

Uploading private images/files to cloudinary, Ruby on Rails and ActiveStorage

I'm looking to upload images/files as private to Cloudinary via ActiveStorage, how to view them is a bonus, but I think I know how.

I know I need to set the type to private, but I've been unable to determine where/how to do that. I'm been googling it pretty hard but no luck and looking at the cloudinary gem specs and the active storage section of cloudinary doesn't seem helpful. I'd want everything uploaded to be private.

Cloudinary's ActiveStorage (AS) support via the Ruby SDK is implemented similar to other Storage providers, such as Azure blobs or Amazon S3. As a Storage service, its sole purpose is to store files on the integrated service, but AS is not able to support all Cloudinary features or custom upload flows, such as private/authenticated resources. This is supported on Cloudinary, but due to the constraint with how standard AS services are integrated, it means it's currently not supported through AS. Having said that, you can use the Ruby SDK directly to manage the uploads without AS in which case you can use private/authenticated resources and any other Cloudinary functionality.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM