Can Cloudinary CLI sync create subfolders?

pludlow
pludlow Member Posts: 17
edited July 2023 in Developer APIs

I am testing sync using Cloudinary CLI, but it does not seem to create subfolders from the Cloudinary target. Is there a way to enable this?

I am using the command:

cld sync -F --pull /localFolder /cloudinaryFolder

This command does sync all assets from the target Cloudinary folder to my local folder, but does not create any existing subfolders (any files that may be in subfolders sync at the local folder root). Dynamic Folders is enabled on this environment, so I'm unsure if that makes a difference.

It is important that the sync feature can replicate the folder/subfolder structure of what is in Cloudinary, but I have not been able to do this in the CLI (yet). Any guidance would be appreciated.

Thanks.

Tagged:

Answers

  • pludlow
    pludlow Member Posts: 17
    edited July 2023

    Follow up to this question, it does seem that the Cloudinary CLI is not familiar with "Dynamic Folders" in that folders/subfolders seen in the UI are not synced. However, if the public id of a file has a / in it, it will create an associated folder in the local sync. This doesn't resolve my issue, but does provide more information.

    So sync is based off public id which is definitely the expected behavior if not using dynamic folders. Because dynamic folders are not represented in the public id, it makes sense that they do not show in the sync. It seems that for sync to work in that what there would need to be a command option to account for asset_folder and display_name of an asset.

  • johnr
    johnr Member Posts: 7

    Hi,

    Thank you for bringing this to our attention.

    The CLI does indeed, follow the structure of the public_id and ignores the dynamic folder structure.

    It would definitely need enhancements on our end to accommodate dynamic folders. With that, I have created a ticket internally to address this issue.

    I noticed that you have also submitted a support ticket, we will provide you with updates on this matter there moving forward.

    Regards,

    John