When using Carrierwave with server-side uploads, you can use a code like the following:
classPictureUploader < CarrierWave::Uploader::Base include Cloudinary::CarrierWave ... def public_id return "my_folder/" + model.short_name end end
If you're using client-side upload, you can set the
folder parameter when building the upload tag:
<%= f.cl_image_upload(:image, :folder => "my_folder") %>
In order to sync the folders in the Media library with the created folders from the API, you should enable 'Auto-create folders' from the Upload settings page. This will be applied to all newly created folders.