GithubHelp home page GithubHelp logo

Accessing Reponse Data about croppic HOT 4 CLOSED

JordanDalton avatar JordanDalton commented on July 23, 2024
Accessing Reponse Data

from croppic.

Comments (4)

sconsult avatar sconsult commented on July 23, 2024

Hi JordanDalton,

I just released today an update with a new CallBack Function called: onError.
It actually handles response Data exactly in the way you need it and i believe it can be a good guideline for you on how to optimize your code.

Just as a little Hint:
on index.html (register the callback and create a function with code):
line 557: onError:function(errormessage){ console.log('onError:'+errormessage) }

in croppic.js (checking if there is a reason to call the registered callback, if yes call it)
line 560: if (that.options.onError) that.options.onError.call(that,response.message);

Let me know if you have any questions.

Cheers

Mat

from croppic.

gnumoksha avatar gnumoksha commented on July 23, 2024

I think that this feature it is necessary

from croppic.

sconsult avatar sconsult commented on July 23, 2024

hi @gnumoksha

I'm not sure what you are implying. the feature is already implemented. if you need something else or found a bug, please open a new ticket.

Cheers

Mat

from croppic.

gnumoksha avatar gnumoksha commented on July 23, 2024

@sconsult the feature that @JordanDalton say about: a way to get response data returned by onAfterImgUpload. Considerer that the user needs to get values in the response, currently he needs to make like bellow, right?

onAfterImgUpload: function(var1, var2) {                                         
        if (typeof(window.response.id) != 'undefined') {                         
            console.log(window.response.id);                             
        } else {                                                                 
            console.error(window.response);      
       }
}

from croppic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.