I'm using the upload widget on my website. In my options to `createUploadWidget()`, I include context, which is mentioned here as "Map of key-value pairs". I'm using the context metadata to keep track of an ID of an item that the uploaded image is related to. However, in the `uploadSignature` function I give it, the params that cloudinary gives to me does not include the context.
Even if I hard-code the context as an object in what gets sent to my Node server for the signature request, where I use `cloudinary.v2.utils.api_sign_request(req.body)`, that `api_sign_request` function does not expect `context` to be an object, it expects only string params. If I debug the `api_sign_request` method, I can see that the signature tries to sign a string with `context=[object Object]`, which of course isn't right.
So the solution for me now is to hardcode a string into my signature request to the server, as a string, e.g. `context=noteId=123`.
Please sign in to leave a comment.