Skip to main content

Editing and existing photo using the widget

Comments

2 comments

  • Official comment
    Erwin Lukas

    Hi Gabriel,

    Thank you for reaching out to us. We are aware of this limitation with Upload Widget v2. We have made aware to our engineer and they are looking into this.

    In the mean time you can try using our Upload Widget v1 as a workaround.
    Below is the example of the code:

    <script type="text/javascript">
        var widget;
        var init = function() {
            widget = cloudinary.createUploadWidget({
                cloud_name      : '<cloud_name>',
                upload_preset   : '<upload_preset>,
                cropping        : 'server',
            }, function( error, result ) {
                console.error(error);
                console.log(result);
            });
    
            $('#openWidget').on('click', function() {
                widget.open();
            });
    
            $('#recrop').on('click', function() {
                widget.open({file:"https://shoptiques.s3.amazonaws.com/docs/sample.jpg"});
            });
        }
    
        $(init);
    </script>
    

    I realize this is less than an ideal solution, and hopefully it is sufficient for what you are looking for.

    we will provide an update once v2 is resolved

  • Ido

    Hi Gabriel,

    I'm circling back to let you know that using the upload widget's cropping with a predefined url now works as expected.

    I hope this would help your use case

    0

Post is closed for comments.