How to use the dropzone.dataURItoBlob function in dropzone

To help you get started, we’ve selected a few dropzone examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github concrete5 / concrete5 / build / components / avatar / Cropper.js View on Github external
img = new Image();

            img.src = file.dataURL;

            canvas.width = this.width;
            canvas.height = this.height;

            // Draw the image cropped
            ctx.drawImage(
                img, this.$refs.image.x, this.$refs.image.y,
                this.$refs.image.resizeWidth, this.$refs.image.resizeHeight);

            this.saving = true;
            // Complete the upload
            let data = canvas.toDataURL(),
                result = done(Dropzone.dataURItoBlob(data));

            this.currentimage = data;
            return result;
        },