Video generation - passing public id containing a slash as a var

rossen Member Posts: 2


I'm trying to generate a video from a CLT template file as described here: It works well if the video is located in the root folder (so no slashes in the public id), as well as with vars for text, colour, etc., but I'm having some issues passing a public id for a video which contains a slash.

I've tried passing it without encoding the slashes, with encoding the slash, and with adding a leading encoded slash, but I'm getting an "Invalid transformation component" error in the `X-Cld-Error` header.

This is what my vars look like: `(backgroundColor_white;titleText_crossfade;vid1_%2Fa-folder%2Fvideo)`. Also tried encoding the `-`, but no luck still. Couldn't find documentation on what's the correct way to do it, so any help is appreciated, thank you.


Best Answer

  • Tamara
    Tamara Member, Cloudinary Staff Posts: 102
    Answer ✓

    Hi there,

    You can use the `s:` prefix to unescape a URL encoded string e.g. `s:folder%252Fasset_name`

    or `s64:` decode base64 encoded string e.g s64:aW1hZ2VzL3Bob3RvX3R3b18xNV95OHNueXI=

    Please let me know if you have further questions,

    Best regards,



  • rossen
    rossen Member Posts: 2

    Encoding with base64 did the trick, thank you!