client side resizing isnot working.

1,762 views
Skip to first unread message

PhilippeL

unread,
May 20, 2013, 6:21:26 AM5/20/13
to jquery-f...@googlegroups.com
Hi All,

We tried to make the BlueImp fileUpload image resize feature work with no success.
The files are well uploaded, no error but no resize is applied.

We updated the pluging version to the latest a week ago and no success in resizing pictures.
We read a lof of similar issues but none of the solutions are working for us.

Here is ou code :

$('#fileupload').fileupload({
            url
: 'uploadPublicPictures',
            previewMaxWidth
: 60,
            previewMaxHeight
: 60,
            maxFileSize
: 5000000,
            minFileSize
: 5000,
            imageCrop
: false,
            acceptFileTypes
: /(\.|\/)(gif|jpeg|jpg|png)$/i,
            maxNumberOfFiles
:10,
            autoUpload
: false,
            process
: [
               
{
                    action
: 'load',
                    fileTypes
: /^image\/(gif|jpeg|jpg|png)$/
               
},
               
{
                    action
: 'resize',
                    maxWidth
: 1024,
                    maxHeight
: 768
               
},
               
{
                    action
: 'save'
               
}
           
]

       
});

Can someone please highlight where the problem could be? This just puzzles our minds...

Thank you for your help.


ghis...@milky-interactive.com

unread,
May 24, 2013, 10:18:46 AM5/24/13
to jquery-f...@googlegroups.com
same here. There is not resize with a similar code, and no restriction on the file type for example :s

eme...@milky-interactive.com

unread,
May 27, 2013, 8:50:21 AM5/27/13
to jquery-f...@googlegroups.com
Hi,

Perhaps you have already find a solution. But in my case, the issue was that the parameter 'disableImageResize' was not set to false.
By default, this parameter is equal to true, so the image resizing function was never called.

Hope that helps :)


Le lundi 20 mai 2013 12:21:26 UTC+2, PhilippeL a écrit :

Michael Freeman

unread,
May 30, 2013, 8:11:21 AM5/30/13
to jquery-f...@googlegroups.com
Tried everything, resize not working, not even in demo.

Must be a bug.



Travis Todd

unread,
Jun 18, 2013, 10:11:38 AM6/18/13
to jquery-f...@googlegroups.com
I am also having the same issues. Using the rails gem.

mc....@gmail.com

unread,
Aug 5, 2013, 6:10:44 AM8/5/13
to jquery-f...@googlegroups.com
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>jQuery File Upload Example</title>
</head>
<body>
<input id="fileupload" type="file" name="files[]" data-url="test/" multiple>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="js/jquery.ui.widget.js"></script>
<script src="js/jquery.iframe-transport.js"></script>
<script src="js/jquery.fileupload.js"></script>
<script src="js/load-image.min.js"></script>
<script src="js/canvas-to-blob.min.js"></script>
<script src="js/jquery.fileupload-process.js"></script>
<script src="js/jquery.fileupload-image.js"></script>
<script>

$(function () {
    $('#fileupload').fileupload({
        dataType: 'json',
        disableImageResize: 'false',
        process:[
            {
                action: 'load',
                fileTypes: /^image\/(gif|jpeg|png)$/,
                maxFileSize: 20000000 // 20MB
            },
            {
                action: 'resize',
                maxWidth: 800,
                maxHeight: 600,
            },
            {
                action: 'save'
            }
        ],


        done: function (e, data) {
            $.each(data.result.files, function (index, file) {
                $('<p/>').text(file.name + ' erfolgreich').appendTo(document.body);
            });
        }
    });
});


</script>
</body>
</html>

Andrew Brown

unread,
Sep 14, 2013, 2:59:26 AM9/14/13
to jquery-f...@googlegroups.com
I've had a similar problem.  I was using the rails gem version of jquery-fileluplaod and an explicit resize process worked, but I wanted some most recent features to I switched to the latest release.  Interestingly, image resize worked on Firefox for Mac, but failed on Chrome and Safari for Mac and iOS Safari.

miken...@gmail.com

unread,
Dec 27, 2013, 1:01:06 PM12/27/13
to jquery-f...@googlegroups.com
We have the exact same problem. All parameters are set according to the documentation, yet file resize doesn't work. We're on the latest versions of all files as of today.

Has anybody figured out why it doesn't work?

Thanks

miken...@gmail.com

unread,
Dec 28, 2013, 1:38:46 AM12/28/13
to jquery-f...@googlegroups.com
Problem resolved.

The default value for "loadImageMaxFileSize" is 10MB and its set in jquery.fileupload-image.js:115 (version 1.7.0). If you try to upload a file that's larger than 10MB, resizing is skipped and the original file is being uploaded.
We set the "loadImageMaxFileSize" to a larger value and now all pictures from our users' SLR cameras are resized automatically.

I hope that helps
Reply all
Reply to author
Forward
0 new messages