Skip to main content

How to move an asset from one folder to another

Comments

24 comments

  • Eric Rasch

    There's no 'bulk' way to move images into a folder? If I have 100 images, I'm not going to pull up each image to guess at the name of the folder. I'm especially not going to do that for 1000 images. In the same vein, there doesn't seem to be a way to bulk tag images, either.

    1
  • Nadav Ofir

    Hi Eric, bulk operations via the UI (inc. tagging, moving between folders, and more..) is currently WIP in our labs, and should become available somewhere during the next couple of months.
    Meantime, you can use our API to issue this kind of operation. We'd love to help if needed, feel free to contact us on a support ticket.

    0
  • Joe Ellis

    Is this available yet? I would like to move some images from one folder to another. Finding it very difficult - and not sure how to work an API?

    0
  • Nadav Ofir

    Hi Joe, not yet unfortunately.
    However, please don't hesitate to open a support ticket and our guys will be happy to assist you with processing this relocation.

    0
  • jglazebrook

    Any update on this?

    0
  • Nadav Ofir

    Hi, sorry for not updating this thread earlier.
    A couple of months ago we added a multi-selection capability to the Media-Library along with a nice set of operations, including bulk move to folder, as well as ZIP archiving, tagging & deleting.

    0
  • Gerardo Argueta

    is the select all available yet?

    0
  • Nadav Ofir

    Hi Gerardo,
    While the "select all" option is not supported, you can select a range of resources by holding the 'Shift' key when checking two check-boxes. More advanced UI features are on their way.

    0
  • Scott Heliker

    What if it is a Facebook profile image? There is no rename option.
    I need to put Facebook profile images that i pull in from a wifi login system that uses Facebook into a clients folder that has presets on it, then pass back that url into a merge tag in Mail Chimp..

    First i need to figure out how to get the Facebook image in a folder though or how to get these uploaded through zapier but i keep getting an error there.

    Need some help with this... A zapier app would be great. Have you guys thought about this? This is painful right now lol

    0
  • Nadav Ofir

    You may use tags to distinguish between different users content instead of folders.
    Facebook resources, like any other automatically fetched resource cannot be renamed as we require the name to correspond to its origin (e.g. profile ID, URL, etc.).
    To bypass this restriction you can upload the image, and save with any public ID you desire.

    0
  • Scott Heliker

    I keep getting an error when trying to upload. Not sure i have right settings here or missing something.

    https://www.screencast.com/t/oItRtQN9jXJN

    https://www.screencast.com/t/jjRiStblkaQD

    I wanted to use folders so everything was a little more organized.

    0
  • Nadav Ofir

    Hi Scott, try setting "payload type" to "form".
    Also note that our upload API requires providing either a signature (for signed upload) or a unsigned upload-preset (for unsigned). API-SECRET shouldn't be passed as a parameter to the HTTP POST request.
    More information here: http://cloudinary.com/documentation/upload_images

    0
  • Lionel Ipser

    Hello,

    Is the possibility to rename or move a file available?

    Thanks,

    Lionel

    0
  • Maor Gariv

    Hi Lionel,

    Sure:) You can rename a file directly from the Media library (as explained by Itay).
    Alternatively, you can use the rename API -
    http://cloudinary.com/documentation/image_upload_api_reference#rename

    0
  • Kortex

    Guys, this does not work, the new rename doesn't work, it keeps saying “Resource not found”, even when it is clearly there.

    I tried the v1 way and it works, however it just changes the public_id and doesn't actually move the file which is not the intended goal. We need an api call to actually move the file and not just rename.

    Please help fix Cloudinary Team, thank you!!!

    0
  • Loic Verger Del Bove

    Hi @Kortex,

    There are 2 things to take in consideration:

    • Ensure you are using the right `resource_type` and `type`. This certainly explain why you get a `Resource not found` error. I looked at our logs and you were looking for `jgxrrcgt0od1pvov4kmk` which is a video but you were using `image` as the `resource_type`
    • As documented here, new accounts are using the `Dynamic folder` mode hence if you want to move an asset from one folder to another, the instructions here are not enough as the `public_id` is now dissociated from its `asset_folder` and `display_name`. You can use the Upload API Explicit method to edit the `asset_folder` and move the asset. If you also want to rename the filename, you can edit the `display_name`. 

    Hope that helps.

    Best,

    Loic

    1
  • Kortex

    Wow, that's interesting, thank you for the swift response @Loic, 

    Okay, I will try this and get back to you.

    0
  • Kortex

    Hi @Loic, this worked however, it did not move to a new folder, please how can I change the public id and then move to a new folder as well.

    I do not want to re-upload the file as these are large files, please what can we do about this?

    0
  • Loic Verger Del Bove

    @Kortex, please share the code and the `public_id` you used when doing the Explicit API method. The result of the explicit method with the `asset_folder` is documented here: https://cloudinary.com/documentation/image_upload_api_reference#explicit:~:text=Setting%20this%20value%20in%20an%20explicit%20method%20moves%20the%20asset%20to%20the%20specified%20asset%20folder%2C%20but%20does%20not%20impact%20the%20asset%E2%80%99s%20public%20ID%20path.. 

    0
  • Kortex

    Hi @Loic, so I didn't do this, explicit API method, trying it now, however I can see that in the type for the options that the explicit API calls, there's no `asset_folder` option, only seeing `folder` option, does that work?

    0
  • Kortex

    This is for the NodeJS SDK between

    0
  • Loic Verger Del Bove

    @kortex, you should still be able to use `asset_folder` evne if it is not declared in the type options: https://github.com/cloudinary/cloudinary_npm/blob/master/lib/utils/index.js#L378

    https://github.com/cloudinary/cloudinary_npm/blob/master/lib/utils/index.js#L1543-L1545

     

    0
  • Kortex

    It worked!!! Thank you so much @Loic, you were super super helpful! 

    Hope you have an amazing day!

    0
  • Loic Verger Del Bove

    @kortex, amazing news! Glad this is now working :)

    Have an amazing day too!

    0

Please sign in to leave a comment.