Skip to main content

uploadSignature error handling



  • Raya Straus

    Hi Alex,

    If you're using our new upload widget (v2) then the implementation will be similar to the following-

      uploadPreset: "docs_preset",
      showCompletedButton: true,
      }, (error, result) => {
        const eventData =;
        if (eventData.event === "success") {
          console.log("upload success ==> ",result); 

    For more information on our v2 upload widget and event handling please see the following-


  • Alex Bjørlig

    HI @Raya.


    Thanks for your answer, but I think you might have misread the question or maybe it was not precise enough. I was asking about the uploadSignature function.


    Tak for example the official example: 

      <script type="text/javascript">
        var generateSignature = function(callback, params_to_sign){
           url     :",
           type    : "GET",
           dataType: "text",
           data    : { data: params_to_sign},
           complete: function() {console.log("complete")},
           success : function(signature, textStatus, xhr) { callback(signature); },
           error   : function(xhr, status, error) { console.log(xhr, status, error); }

    Here there is no error handling implementation, other than logging. Should the error not be passed back as the callback?

    I experimented with that in my implementation, but the upload widget then throws a weird error about unsigned upload?


Post is closed for comments.