Invalid Signature when upload video from media widget

Comments

4 comments

  • Avatar
    Daniel Mendoza

    @Vinei

    I apologize for getting to this late. It does seem odd and the signature you generated should have worked.

    I am continuing to review the logs on our end.

    Regards,

    Daniel

    0
    Comment actions Permalink
  • Avatar
    Vinei

    @Daniel
    I appreciate your help, i'm looking forward to your investigation.
    Thank you!

    0
    Comment actions Permalink
  • Avatar
    Aleksandar Kostadinov

    Hi Vinei,

    The generated signature was correct but we see that there are additional double quotes as part of the signature string which shouldn't be there and that's causing the mismatch.

    For example, the signature is coming through as:

    "7b80e25f02da5ce9eefffac902f7574e0af4aa62"

    But it should be just:

    7b80e25f02da5ce9eefffac902f7574e0af4aa62

    May I please ask you to check the 'signature' value you receive in the front-end code to ensure it doesn't have the enclosing quotes?

    0
    Comment actions Permalink
  • Avatar
    Vinei

    Hi @Aleksandar,

    I'm sorry it takes me a week to reply back. I got your point here.
    I able to resolve the issue by replace the the double quote after get response from api controller.

    var generateSignature = function(callback, params_to_sign) {
    $.ajax({
    url :"/api/v1/cloudinary/generate_sign_signature",
    type :"GET",
    dataType:"text",
    data : params_to_sign,
    complete:function() {console.log("completely generated cloudinary signed signature.")},
    success:function(signature, textStatus, xhr) {
    var escSignature =String(signature).replaceAll('\"','');
    callback(escSignature);
    },
    error:function(xhr, status, error) { console.log(xhr, status, error); }
    });
    }

    Thank you!

    0
    Comment actions Permalink

Please sign in to leave a comment.