ccorcos / meteor-clientside-image-manipulation

A clientside javascript library for manipulating images before uploading. Specifically, resizing and adjusting for image orientation.
43 stars 4 forks source link

client side manipulation with slingshot #13

Closed demiantriebl closed 8 years ago

demiantriebl commented 8 years ago

hi, i try to upload files to google cloud storage, i can do it, but i need to optimize the image, i try to use your package, but when i use this code:

'change #avatarInput': function(e){
        e.preventDefault();
        var file = $('#avatarInput').prop('files');
        processImage(file[0].name, 300, 300, function(dataURI) {
            var blob = dataURItoBlob(dataURI);
            var uploader = new Slingshot.Upload("myDefinedDirective");
            uploader.send(file , function (error, downloadUrl) {
                if (error) {
                    $('.cargaIMG').hide();
                    // Log service detailed response
                    console.error('Error uploading', uploader.xhr.response);
                    alert (error);
                }
                else {
                    $('.cargaIMG').hide();
                    $('#resultado').append('<div id="botoneraIMG">' +
                        ' <img id="cropping" src="' + downloadUrl + '"/>+' +
                        '</div>'
                    );
                }
            });

        });
     }

i see in the console this error

Uncaught TypeError: Failed to execute 'createObjectURL' on 'URL': No function was found that matched the signature provided.

ccorcos_clientside-image-manipulation.js:960

any clue?

ccorcos commented 8 years ago

sorry, I can't help with this.