Question

I'm using the FineUploader core and I'm trying to show a thumbnail of the uploaded files. In a nutshell I'm using this:

this.uploader = new qq.FineUploaderBasic({
    callbacks: {
        onSubmit: function(id, fileName) {
            var canvas = document.createElement('canvas');
            canvas.width = 50;
            canvas.height = 50;
            $('#file-'+id+' .upload_thumbnail').html(canvas);
            this.drawThumbnail(id, canvas, 50, false);
        }
    }
 });

However, I get the following error in Firebug:

ReferenceError: MegaPixImage is not defined mpImg = new MegaPixImage(fileOrBlob, megapixErrorHandler);

What am I missing?

Was it helpful?

Solution

Ok, I see the MegaPixImage is an external javascript library that is included in the FineUploader build, but doesn't work with my current RequireJS setup. If I include the MegaPixImage as a seperate file, I get the thumbnail function to work

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top