Move image from one folder to another
Best Answer
-
it is giving error if i do this
fromPublicId = oldPID, toPublicId = newPID
I found a working solution
RenameParams renameParams = new RenameParams(oldPID, newPID)
{
FromPublicId = oldPID,
ToPublicId = newPID
};
1
Answers
-
Hi @rwahdan,
To move assets out of a folder:- In dynamic folder mode, use the update method with the
asset_folder
parameter to change the asset's asset folder. - In fixed folder mode, use the rename method to change the public ID path (in .NET it's
cloudinary.Rename(renameParams);
).
Best,
Tamara0 - In dynamic folder mode, use the update method with the
-
sorry for asking, how to know if I have dynamic or fixed folders? I am creating folders through API.
0 -
here is a screenshot, does that mean it is fixed?
but if i open the image i can edit it
0 -
Here is what I tried:
RenameParams renameParams = new RenameParams()
{
FromPublicId = oldPID,
ToPublicId = newPID
};
getting error:
error CS7036: There is no argumen
t given that corresponds to the required parameter 'fromPublicId' of RenameParams.RenameParams(string, string)0 -
Hi,
Please use the first character as lower case like the following:
RenameParams renameParams = new RenameParams(){ fromPublicId = oldPID, toPublicId = newPID};
Let me know if there's still an issue.
Regards,
AnthonyDeveloper Support Engineer
CloudinaryHelpful Links For You
💬 Share questions, connect with other users in our Cloudinary Community forums and Discord server!
🧑🎓 Join our Cloudinary Academy for free courses, workshops and other educational resources.
📄 Read our documentation for in-depth details on Cloudinary product features and capabilities
📰 Check out the Cloudinary blog for the latest company news and insights0