How can I rename a folder which already contains resources?

Follow

Comments

4 comments

  • Avatar
    Digiphoto Entertainment Imaging

    Nadav. I want to achieve this functionality in a dot net based window application.Please guide me how to do this.

  • Avatar
    Nadav Ofir

    The technique is the same as described in the article above.
    .NET Renaming method is documented here:
    http://cloudinary.com/documentation/dotnet_image_upload#rename_images

  • Avatar
    Hugues GENDRE

    Good morning,

    we have made a huge mistake when naming our folders, including spaces. So that the url of the media are not seo friendly.

    Since the medias are not used over the web yet, could you please rename our folders for us ?

    The idea would be to replace the spaces by a "-"

    Let me know if this is possible

    Thank you

    Hugues 

  • Avatar
    Stephen Doyle

    Hi Hugues, 

    I've responded to your ticket about this directly also, but for the benefit of other customers who see this comment - the solution is to rename the files in the 'old' folder and specify the 'new' folder as part of the new public_id.

    This can be performed using the rename method of the API, called for each image in the old folder.

    As Nadav said above, this is because the 'folder' is simply part of the public_id of the image, and changing it requires changing the public ID.  This also stops the old public_id from being accessible, so it's important to be sure you want to rename the files (e.g. you must check that the old URL isn't in use on your website or app already)

    Thanks,
    Stephen

Please sign in to leave a comment.